diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a560a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +\__pycache__ +\pakk.conf \ No newline at end of file diff --git a/main.py b/main.py index b136b32..8469bc1 100644 --- a/main.py +++ b/main.py @@ -6,8 +6,7 @@ from inspect import isfunction import random import time import ast -if os.name != 'nt': - import readline +#import readline import threading diff --git a/packages/__pycache__/builtin.cpython-311.pyc b/packages/__pycache__/builtin.cpython-311.pyc index 18b8d49..231d389 100644 Binary files a/packages/__pycache__/builtin.cpython-311.pyc and b/packages/__pycache__/builtin.cpython-311.pyc differ diff --git a/packages/__pycache__/netget.cpython-311.pyc b/packages/__pycache__/netget.cpython-311.pyc index 74eeb1c..c2c5902 100644 Binary files a/packages/__pycache__/netget.cpython-311.pyc and b/packages/__pycache__/netget.cpython-311.pyc differ diff --git a/packages/netget.py b/packages/netget.py index abe3538..0a1b32c 100644 --- a/packages/netget.py +++ b/packages/netget.py @@ -5,9 +5,10 @@ import os, sys def netget(command: list): - #print(command, len(command)) + print(command, len(command)) if len(command) != 2: print("comand requires [ url ] [ path ]") + return url = command[0] location = command[1] diff --git a/packages/pakk.conf b/packages/pakk.conf index 8b2e945..3723315 100644 --- a/packages/pakk.conf +++ b/packages/pakk.conf @@ -1 +1 @@ -[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['nano', 'packages.nano', ['nano']]] \ No newline at end of file +[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['nano', 'packages.nano', ['nano']], ['netget', 'packages.netget', ['netget']], ['pip', 'packages.pip', ['pip']]] \ No newline at end of file diff --git a/packages/pip.py b/packages/pip.py new file mode 100644 index 0000000..dad2025 --- /dev/null +++ b/packages/pip.py @@ -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 \ No newline at end of file