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.
Files changed (26) hide show
  1. {shell_lite-0.4.1/shell_lite.egg-info → shell_lite-0.4.2}/PKG-INFO +1 -1
  2. {shell_lite-0.4.1 → shell_lite-0.4.2}/pyproject.toml +1 -1
  3. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/interpreter.py +2 -2
  4. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/main.py +2 -3
  5. {shell_lite-0.4.1 → shell_lite-0.4.2/shell_lite.egg-info}/PKG-INFO +1 -1
  6. {shell_lite-0.4.1 → shell_lite-0.4.2}/LICENSE +0 -0
  7. {shell_lite-0.4.1 → shell_lite-0.4.2}/README.md +0 -0
  8. {shell_lite-0.4.1 → shell_lite-0.4.2}/setup.cfg +0 -0
  9. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/__init__.py +0 -0
  10. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/ast_nodes.py +0 -0
  11. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/cli.py +0 -0
  12. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/compiler.py +0 -0
  13. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/formatter.py +0 -0
  14. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/js_compiler.py +0 -0
  15. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/lexer.py +0 -0
  16. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/parser.py +0 -0
  17. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite/runtime.py +0 -0
  18. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/SOURCES.txt +0 -0
  19. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/dependency_links.txt +0 -0
  20. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/entry_points.txt +0 -0
  21. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/requires.txt +0 -0
  22. {shell_lite-0.4.1 → shell_lite-0.4.2}/shell_lite.egg-info/top_level.txt +0 -0
  23. {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_interpreter.py +0 -0
  24. {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_lexer.py +0 -0
  25. {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_parser.py +0 -0
  26. {shell_lite-0.4.1 → shell_lite-0.4.2}/tests/test_stdlib.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shell-lite
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: A lightweight, English-like scripting language.
5
5
  Author-email: Shrey Naithani <contact@shelllite.tech>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "shell-lite"
7
- version = "0.04.1"
7
+ version = "0.04.2"
8
8
  description = "A lightweight, English-like scripting language."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -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.1 | Made by Shrey Naithani")
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
- res = subprocess.run(["where", "shl"], capture_output=True, text=True)
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':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shell-lite
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: A lightweight, English-like scripting language.
5
5
  Author-email: Shrey Naithani <contact@shelllite.tech>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes