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