pip package
new file: .gitignore new file: packages/pip.py
This commit is contained in:
parent
f72dd90f88
commit
3b5dcfc081
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
\__pycache__
|
||||||
|
\pakk.conf
|
3
main.py
3
main.py
@ -6,8 +6,7 @@ from inspect import isfunction
|
|||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import ast
|
import ast
|
||||||
if os.name != 'nt':
|
#import readline
|
||||||
import readline
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -5,9 +5,10 @@ import os, sys
|
|||||||
|
|
||||||
def netget(command: list):
|
def netget(command: list):
|
||||||
|
|
||||||
#print(command, len(command))
|
print(command, len(command))
|
||||||
if len(command) != 2:
|
if len(command) != 2:
|
||||||
print("comand requires [ url ] [ path ]")
|
print("comand requires [ url ] [ path ]")
|
||||||
|
return
|
||||||
|
|
||||||
url = command[0]
|
url = command[0]
|
||||||
location = command[1]
|
location = command[1]
|
||||||
|
@ -1 +1 @@
|
|||||||
[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['nano', 'packages.nano', ['nano']]]
|
[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['nano', 'packages.nano', ['nano']], ['netget', 'packages.netget', ['netget']], ['pip', 'packages.pip', ['pip']]]
|
23
packages/pip.py
Normal file
23
packages/pip.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#["pip", "packages.pip", ["pip"]]
|
||||||
|
# Made By Blurple
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
|
||||||
|
def pip(command: list):
|
||||||
|
|
||||||
|
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}")
|
||||||
|
|
||||||
|
except:
|
||||||
|
print("cannot download")
|
||||||
|
|
||||||
|
# im trying to make a pip command so i can install from in the app
|
Loading…
Reference in New Issue
Block a user