xmyshell 0.1.3__tar.gz → 0.1.4__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.
Files changed (26) hide show
  1. {xmyshell-0.1.3/xmyshell.egg-info → xmyshell-0.1.4}/PKG-INFO +1 -1
  2. {xmyshell-0.1.3 → xmyshell-0.1.4}/pyproject.toml +1 -1
  3. xmyshell-0.1.4/xmyshell/__main__.py +20 -0
  4. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/update.py +5 -2
  5. {xmyshell-0.1.3 → xmyshell-0.1.4/xmyshell.egg-info}/PKG-INFO +1 -1
  6. xmyshell-0.1.3/xmyshell/__main__.py +0 -12
  7. {xmyshell-0.1.3 → xmyshell-0.1.4}/LICENSE +0 -0
  8. {xmyshell-0.1.3 → xmyshell-0.1.4}/README.md +0 -0
  9. {xmyshell-0.1.3 → xmyshell-0.1.4}/setup.cfg +0 -0
  10. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/__init__.py +0 -0
  11. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/completer.py +0 -0
  12. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/data/commands.json +0 -0
  13. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/environment.py +0 -0
  14. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/init.py +0 -0
  15. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/kernel.py +0 -0
  16. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/keybindings.py +0 -0
  17. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/lexer.py +0 -0
  18. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/main.py +0 -0
  19. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/meta.py +0 -0
  20. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/themes.py +0 -0
  21. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell/utils.py +0 -0
  22. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell.egg-info/SOURCES.txt +0 -0
  23. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell.egg-info/dependency_links.txt +0 -0
  24. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell.egg-info/entry_points.txt +0 -0
  25. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell.egg-info/requires.txt +0 -0
  26. {xmyshell-0.1.3 → xmyshell-0.1.4}/xmyshell.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmyshell
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: XmyShell is a shell-like tool built on top of prompt_toolkit which provides a persistent Python runtime.
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "xmyshell"
3
- version = "0.1.3"
3
+ version = "0.1.4"
4
4
  description = "XmyShell is a shell-like tool built on top of prompt_toolkit which provides a persistent Python runtime."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -0,0 +1,20 @@
1
+ import subprocess
2
+ import sys
3
+
4
+
5
+ def main() -> None:
6
+ argv = sys.argv
7
+
8
+ if len(argv) == 1:
9
+ from .main import xmyshell_main
10
+ xmyshell_main()
11
+ elif argv[1] == "--update":
12
+ subprocess.run([sys.executable, "-m", "xmyshell.update"] + argv[2:])
13
+ elif argv[1] == "--version":
14
+ from .meta import WELCOME_MESSAGE
15
+ print(WELCOME_MESSAGE)
16
+ elif argv[1] == "--help":
17
+ from .meta import HELP_MESSAGE
18
+ print(HELP_MESSAGE)
19
+ else:
20
+ print(f"Error: cannot parse arguments '{' '.join(argv[1:])}'")
@@ -7,7 +7,7 @@ def xmyshell_update(version: str | None = None) -> None:
7
7
  if os.name == "nt":
8
8
  subprocess.run("taskkill /F /IM xmyshell.exe", shell=True)
9
9
  else:
10
- subprocess.run(["pkill", "-f", "xmyshell"])
10
+ subprocess.run(["pkill", "-f", "-x", "xmyshell"])
11
11
 
12
12
  time.sleep(1)
13
13
 
@@ -19,7 +19,10 @@ def xmyshell_update(version: str | None = None) -> None:
19
19
  "--upgrade",
20
20
  "xmyshell" + (f"=={version}" if version else ""),
21
21
  ]
22
- sys.exit(subprocess.run(install_args).returncode)
22
+ print()
23
+ returncode = subprocess.run(install_args).returncode
24
+ print("Press <Enter> to continue ...", end="")
25
+ sys.exit(returncode)
23
26
 
24
27
  if __name__ == "__main__":
25
28
  version = sys.argv[1] if len(sys.argv) >= 2 else None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmyshell
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: XmyShell is a shell-like tool built on top of prompt_toolkit which provides a persistent Python runtime.
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -1,12 +0,0 @@
1
- import sys
2
-
3
- def main() -> None:
4
- if "--version" in sys.argv:
5
- from .meta import WELCOME_MESSAGE
6
- print(WELCOME_MESSAGE)
7
- elif "--help" in sys.argv:
8
- from .meta import HELP_MESSAGE
9
- print(HELP_MESSAGE)
10
- else:
11
- from .main import xmyshell_main
12
- xmyshell_main()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes