commit
b4bf74ab45
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
\__pycache__
|
||||
\pakk.conf
|
||||
.pyc
|
||||
pakk.conf
|
||||
.pyc
|
||||
|
26
Docs.md
Normal file
26
Docs.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Docs
|
||||
|
||||
## Installing a package
|
||||
|
||||
## Creating a package
|
||||
|
||||
Once the package is installed, you can use the commands in it, here is how to make one.
|
||||
|
||||
The top of the file must look like this;
|
||||
|
||||
```python
|
||||
#["name", "package.<package name>", ["commands, command"]]
|
||||
# made by <your name here>
|
||||
```
|
||||
|
||||
then, to write a command, just write a function with the code you want to run, take this for example;
|
||||
|
||||
```python
|
||||
#["echo", "package.echo", ["out"]]
|
||||
# made by OusmBlueNinja
|
||||
|
||||
def out(message):
|
||||
print(message)
|
||||
```
|
||||
|
||||
From here you can run pretty much anything.
|
@ -2,7 +2,6 @@
|
||||
# Made By Blurple
|
||||
import os, sys
|
||||
|
||||
|
||||
def pip(command: list):
|
||||
|
||||
#print(command, len(command))
|
||||
@ -19,6 +18,4 @@ def pip(command: list):
|
||||
|
||||
|
||||
except:
|
||||
print("cannot download")
|
||||
|
||||
# im trying to make a pip command so i can install from in the app
|
||||
print("cannot download")
|
22
packages/update.py
Normal file
22
packages/update.py
Normal file
@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#["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")
|
Loading…
Reference in New Issue
Block a user