Merge branch 'main' into main
This commit is contained in:
commit
c078a94931
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
\__pycache__
|
||||
pakk.conf
|
||||
pakk.conf
|
||||
.pyc
|
||||
|
5
main.py
5
main.py
@ -6,7 +6,8 @@ from inspect import isfunction
|
||||
import random
|
||||
import time
|
||||
import ast
|
||||
#import readline
|
||||
if os.name != "nt":
|
||||
import readline
|
||||
import threading
|
||||
|
||||
|
||||
@ -158,7 +159,7 @@ class packagemanager:
|
||||
print(f"\n{color.green}Success:{color.white} Successfully installed {name}.")
|
||||
|
||||
except Exception as e:
|
||||
raise Exception(e)
|
||||
raise Exception(f"{color.red}{e}")
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -94,9 +94,9 @@ def ll(args):
|
||||
file_stat = entry.stat()
|
||||
file_name = entry.name
|
||||
|
||||
|
||||
pw = pwd.getpwuid(file_stat.st_uid)
|
||||
gr = grp.getgrgid(file_stat.st_gid)
|
||||
if os.name != 'nt':
|
||||
pw = pwd.getpwuid(file_stat.st_uid)
|
||||
gr = grp.getgrgid(file_stat.st_gid)
|
||||
|
||||
is_hidden = (file_name and file_name[0] == '.')
|
||||
|
||||
|
@ -4,17 +4,18 @@ import os, sys
|
||||
|
||||
def pip(command: list):
|
||||
|
||||
print(command, len(command))
|
||||
#print(command, len(command))
|
||||
if len(command) != 1:
|
||||
print("comand requires [ package_name ] [ args (optional) ] ")
|
||||
return
|
||||
|
||||
package = command[0]
|
||||
try:
|
||||
from pip._internal import main as pipmain
|
||||
pipmain(['install', {package}])
|
||||
except ImportError:
|
||||
os.system(f"pip install {package}")
|
||||
print("Running pip from shell")
|
||||
os.system(f"python -m pip install {package}")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
except:
|
||||
print("cannot download")
|
Loading…
Reference in New Issue
Block a user