shell-lite 0.4.1__tar.gz → 0.4.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.
- {shell_lite-0.4.1/shell_lite.egg-info → shell_lite-0.4.2}/PKG-INFO +1 -1
- {shell_lite-0.4.1 → shell_lite-0.4.2}/pyproject.toml +1 -1
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/interpreter.py +2 -2
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/main.py +2 -3
- {shell_lite-0.4.1 → shell_lite-0.4.2/shell_lite.egg-info}/PKG-INFO +1 -1
- {shell_lite-0.4.1 → shell_lite-0.4.2}/LICENSE +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/README.md +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/setup.cfg +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/__init__.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/ast_nodes.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/cli.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/compiler.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/formatter.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/js_compiler.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/lexer.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/parser.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/runtime.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/SOURCES.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/dependency_links.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/entry_points.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/requires.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/top_level.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_interpreter.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_lexer.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_parser.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_stdlib.py +0 -0
|
@@ -825,7 +825,7 @@ class Interpreter:
|
|
|
825
825
|
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
|
|
826
826
|
if result.returncode != 0:
|
|
827
827
|
print(f"Command Error: {result.stderr}")
|
|
828
|
-
return result.stdout.strip()
|
|
828
|
+
return result.stdout.strip() or result.stderr.strip()
|
|
829
829
|
except Exception as e:
|
|
830
830
|
raise RuntimeError(f"Failed to run command: {e}")
|
|
831
831
|
def builtin_read(self, path):
|
|
@@ -1496,7 +1496,7 @@ class Interpreter:
|
|
|
1496
1496
|
if interpreter_ref.web.stack:
|
|
1497
1497
|
pass
|
|
1498
1498
|
if isinstance(result, Tag): response_body = str(result)
|
|
1499
|
-
elif result: response_body = str(result)
|
|
1499
|
+
elif result is not None: response_body = str(result)
|
|
1500
1500
|
else: response_body = "OK"
|
|
1501
1501
|
self.send_response(200)
|
|
1502
1502
|
self.send_header('Content-Type', 'text/html')
|
|
@@ -61,7 +61,7 @@ def run_repl():
|
|
|
61
61
|
print("\n" + "="*40)
|
|
62
62
|
print(" ShellLite REPL - English Syntax")
|
|
63
63
|
print("="*40)
|
|
64
|
-
print("Version: v0.04.
|
|
64
|
+
print("Version: v0.04.2 | Made by Shrey Naithani")
|
|
65
65
|
print("Commands: Type 'exit' to quit, 'help' for examples.")
|
|
66
66
|
print("Note: Terminal commands (like 'shl install') must be run in CMD/PowerShell, not here.")
|
|
67
67
|
|
|
@@ -477,8 +477,7 @@ def format_file(filename: str):
|
|
|
477
477
|
except Exception as e:
|
|
478
478
|
print(f"Formatting failed: {e}")
|
|
479
479
|
def self_install_check():
|
|
480
|
-
|
|
481
|
-
if "ShellLite" not in res.stdout:
|
|
480
|
+
if not shutil.which("shl"):
|
|
482
481
|
print("\nShellLite is not installed globally.")
|
|
483
482
|
choice = input("Would you like to install it so 'shl' works everywhere? (y/n): ").lower()
|
|
484
483
|
if choice == 'y':
|
|
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
|
|
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
|