zeushell 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zeushell-0.1.0/PKG-INFO +51 -0
- zeushell-0.1.0/README.md +41 -0
- zeushell-0.1.0/pyproject.toml +14 -0
- zeushell-0.1.0/setup.cfg +4 -0
- zeushell-0.1.0/zeushell/__init__.py +52 -0
- zeushell-0.1.0/zeushell.egg-info/PKG-INFO +51 -0
- zeushell-0.1.0/zeushell.egg-info/SOURCES.txt +7 -0
- zeushell-0.1.0/zeushell.egg-info/dependency_links.txt +1 -0
- zeushell-0.1.0/zeushell.egg-info/top_level.txt +1 -0
zeushell-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: zeushell
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small Python package published to PyPI
|
|
5
|
+
Author-email: Zeus <zeus@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: example,package,pypi
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# zeushell
|
|
12
|
+
|
|
13
|
+
A simple interactive action-shell framework.
|
|
14
|
+
Write functions — run them as shell commands.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Function-based command system
|
|
19
|
+
- Interactive shell runtime
|
|
20
|
+
- Customizable shell prompt
|
|
21
|
+
- Safe function registry (no exec)
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install zeushell
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from zeushell import function, name, run
|
|
33
|
+
|
|
34
|
+
@function("hello")
|
|
35
|
+
def hi(user):
|
|
36
|
+
return f"Hello {user}"
|
|
37
|
+
|
|
38
|
+
name("zeushell")
|
|
39
|
+
run()
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Shell:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
zeushell: hello Tom
|
|
46
|
+
Hello Tom
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
zeushell-0.1.0/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# zeushell
|
|
2
|
+
|
|
3
|
+
A simple interactive action-shell framework.
|
|
4
|
+
Write functions — run them as shell commands.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- Function-based command system
|
|
9
|
+
- Interactive shell runtime
|
|
10
|
+
- Customizable shell prompt
|
|
11
|
+
- Safe function registry (no exec)
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install zeushell
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from zeushell import function, name, run
|
|
23
|
+
|
|
24
|
+
@function("hello")
|
|
25
|
+
def hi(user):
|
|
26
|
+
return f"Hello {user}"
|
|
27
|
+
|
|
28
|
+
name("zeushell")
|
|
29
|
+
run()
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Shell:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
zeushell: hello Tom
|
|
36
|
+
Hello Tom
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "zeushell"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A small Python package published to PyPI"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Zeus", email = "zeus@gmail.com"}
|
|
7
|
+
]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
keywords = ["example", "package", "pypi"]
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["setuptools", "wheel"]
|
|
14
|
+
build-backend = "setuptools.build_meta"
|
zeushell-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
def name(a):
|
|
2
|
+
shellname=a
|
|
3
|
+
def function(name):
|
|
4
|
+
def dd(func):
|
|
5
|
+
exec(name+"="+func.__name__)
|
|
6
|
+
return func
|
|
7
|
+
try:
|
|
8
|
+
a=open("ss.txt","r")
|
|
9
|
+
s=a.read()
|
|
10
|
+
a.close()
|
|
11
|
+
except:
|
|
12
|
+
s=""
|
|
13
|
+
pass
|
|
14
|
+
w=open("ss.txt","w")
|
|
15
|
+
w.write(s+name+"\n")
|
|
16
|
+
w.close()
|
|
17
|
+
return name
|
|
18
|
+
def run():
|
|
19
|
+
class ZeushellError(Exception):
|
|
20
|
+
pass
|
|
21
|
+
try:
|
|
22
|
+
a=open("ss.txt","r")
|
|
23
|
+
w=a.read()
|
|
24
|
+
a.close()
|
|
25
|
+
except:
|
|
26
|
+
raise ZeushellError("you didn\'n make function")
|
|
27
|
+
try:
|
|
28
|
+
shellname+=": "
|
|
29
|
+
except:
|
|
30
|
+
shellname="Zeushell: "
|
|
31
|
+
srtin=""
|
|
32
|
+
wsss=[]
|
|
33
|
+
for i in w:
|
|
34
|
+
if i=="\n":
|
|
35
|
+
wsss.append(srtin)
|
|
36
|
+
srtin=""
|
|
37
|
+
else:
|
|
38
|
+
srtin+=i
|
|
39
|
+
while True:
|
|
40
|
+
ino=input(shellname)
|
|
41
|
+
s=[]
|
|
42
|
+
aaaa=""
|
|
43
|
+
for i in ino:
|
|
44
|
+
if i==" ":
|
|
45
|
+
s.append(aaaa)
|
|
46
|
+
else:
|
|
47
|
+
aaaa+=i
|
|
48
|
+
aaaaa=s[0]
|
|
49
|
+
s=s[1:]
|
|
50
|
+
s=str(s).replace("[","(").replace("]",")")
|
|
51
|
+
exec(aaaa+s)
|
|
52
|
+
return 1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: zeushell
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small Python package published to PyPI
|
|
5
|
+
Author-email: Zeus <zeus@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: example,package,pypi
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# zeushell
|
|
12
|
+
|
|
13
|
+
A simple interactive action-shell framework.
|
|
14
|
+
Write functions — run them as shell commands.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Function-based command system
|
|
19
|
+
- Interactive shell runtime
|
|
20
|
+
- Customizable shell prompt
|
|
21
|
+
- Safe function registry (no exec)
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install zeushell
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from zeushell import function, name, run
|
|
33
|
+
|
|
34
|
+
@function("hello")
|
|
35
|
+
def hi(user):
|
|
36
|
+
return f"Hello {user}"
|
|
37
|
+
|
|
38
|
+
name("zeushell")
|
|
39
|
+
run()
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Shell:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
zeushell: hello Tom
|
|
46
|
+
Hello Tom
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
zeushell
|