pip package

new file:   .gitignore
	new file:   packages/pip.py
This commit is contained in:
GirlInPurple 2023-08-26 22:22:28 -04:00
parent f72dd90f88
commit 3b5dcfc081
7 changed files with 29 additions and 4 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
\__pycache__
\pakk.conf

View File

@ -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

View File

@ -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]

View File

@ -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
View 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