xmyshell 0.1.1__tar.gz → 0.1.2__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 (24) hide show
  1. {xmyshell-0.1.1/xmyshell.egg-info → xmyshell-0.1.2}/PKG-INFO +1 -1
  2. {xmyshell-0.1.1 → xmyshell-0.1.2}/pyproject.toml +1 -1
  3. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/completer.py +7 -4
  4. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/init.py +4 -1
  5. {xmyshell-0.1.1 → xmyshell-0.1.2/xmyshell.egg-info}/PKG-INFO +1 -1
  6. {xmyshell-0.1.1 → xmyshell-0.1.2}/LICENSE +0 -0
  7. {xmyshell-0.1.1 → xmyshell-0.1.2}/README.md +0 -0
  8. {xmyshell-0.1.1 → xmyshell-0.1.2}/setup.cfg +0 -0
  9. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/__init__.py +0 -0
  10. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/__main__.py +0 -0
  11. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/data/commands.json +0 -0
  12. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/environment.py +0 -0
  13. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/kernel.py +0 -0
  14. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/keybindings.py +0 -0
  15. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/lexer.py +0 -0
  16. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/main.py +0 -0
  17. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/meta.py +0 -0
  18. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/themes.py +0 -0
  19. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell/utils.py +0 -0
  20. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell.egg-info/SOURCES.txt +0 -0
  21. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell.egg-info/dependency_links.txt +0 -0
  22. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell.egg-info/entry_points.txt +0 -0
  23. {xmyshell-0.1.1 → xmyshell-0.1.2}/xmyshell.egg-info/requires.txt +0 -0
  24. {xmyshell-0.1.1 → xmyshell-0.1.2}/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.1
3
+ Version: 0.1.2
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.1"
3
+ version = "0.1.2"
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"
@@ -1,4 +1,5 @@
1
1
  import os
2
+ import sys
2
3
  import re
3
4
  import time
4
5
  import json
@@ -349,8 +350,9 @@ class ShellCompleter(Completer):
349
350
  if not lstripped.endswith(parts[-1]):
350
351
  parts.append("")
351
352
  elif len(parts) == 2:
352
- for module in pkgutil.iter_modules():
353
- name: str = module.name
353
+ mods = set(sys.builtin_module_names)
354
+ mods |= {m.name for m in pkgutil.iter_modules()}
355
+ for name in sorted(mods):
354
356
  if not name.startswith(parts[-1]):
355
357
  continue
356
358
  if name.startswith("_"):
@@ -372,8 +374,9 @@ class ShellCompleter(Completer):
372
374
  if not lstripped.endswith(parts[-1]):
373
375
  parts.append("")
374
376
  elif len(parts) == 2:
375
- for module in pkgutil.iter_modules():
376
- name: str = module.name
377
+ mods = set(sys.builtin_module_names)
378
+ mods |= {m.name for m in pkgutil.iter_modules()}
379
+ for name in sorted(mods):
377
380
  if not name.startswith(parts[-1]):
378
381
  continue
379
382
  if name.startswith("_"):
@@ -1,5 +1,5 @@
1
1
  import os
2
- import runpy
2
+ import sys
3
3
  from .environment import load_init_namespace, init_environ
4
4
  from .themes import load_theme, THEME_DEFAULT
5
5
  from .completer import completer_init
@@ -8,6 +8,9 @@ from .kernel import xmyshell_source
8
8
 
9
9
 
10
10
  def xmyshell_load() -> None:
11
+ if "" not in sys.path:
12
+ sys.path.insert(0, "")
13
+
11
14
  load_init_namespace()
12
15
  completer_init()
13
16
  load_theme(THEME_DEFAULT)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmyshell
3
- Version: 0.1.1
3
+ Version: 0.1.2
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
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