chemql-python 1.0.2__tar.gz → 1.0.3__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. {chemql_python-1.0.2 → chemql_python-1.0.3}/PKG-INFO +1 -1
  2. {chemql_python-1.0.2 → chemql_python-1.0.3}/pyproject.toml +1 -1
  3. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/__init__.py +18 -2
  4. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/PKG-INFO +1 -1
  5. {chemql_python-1.0.2 → chemql_python-1.0.3}/LICENSE +0 -0
  6. {chemql_python-1.0.2 → chemql_python-1.0.3}/README.md +0 -0
  7. {chemql_python-1.0.2 → chemql_python-1.0.3}/setup.cfg +0 -0
  8. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/__main__.py +0 -0
  9. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/BondEnergies.json +0 -0
  10. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/MoleculeBonds.json +0 -0
  11. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/Molecules.json +0 -0
  12. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/PeriodicTableJSON.json +0 -0
  13. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/Reactions.json +0 -0
  14. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/THIRD_PARTY_LICENSES/PeriodicTableJSON.txt +0 -0
  15. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/data/THIRD_PARTY_LICENSES/RHEA.txt +0 -0
  16. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql/html/periodic_table.html +0 -0
  17. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/SOURCES.txt +0 -0
  18. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/dependency_links.txt +0 -0
  19. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/entry_points.txt +0 -0
  20. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/requires.txt +0 -0
  21. {chemql_python-1.0.2 → chemql_python-1.0.3}/src/chemql_python.egg-info/top_level.txt +0 -0
  22. {chemql_python-1.0.2 → chemql_python-1.0.3}/tests/test_external_molecule_lookup.py +0 -0
  23. {chemql_python-1.0.2 → chemql_python-1.0.3}/tests/test_public_api.py +0 -0
  24. {chemql_python-1.0.2 → chemql_python-1.0.3}/tests/test_reactions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chemql-python
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: A chemistry-focused query language and REPL
5
5
  Author-email: Mohammad Rakibul Islam <rakibulofficial1017@gmail.com>
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chemql-python"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  authors = [
9
9
  { name = "Mohammad Rakibul Islam", email = "rakibulofficial1017@gmail.com" }
10
10
  ]
@@ -40,12 +40,28 @@ __all__ = [
40
40
  "__version__"
41
41
  ]
42
42
 
43
- __version__ = "1.0.2"
43
+ __version__ = "1.0.3"
44
44
 
45
45
 
46
46
  _shell_process = None
47
47
 
48
48
 
49
+ def enable_ansi():
50
+ """Enable ANSI escape code support on Windows and Unix-like terminals."""
51
+ if os.name == 'nt':
52
+ import ctypes
53
+ kernel32 = ctypes.windll.kernel32
54
+ # STD_OUTPUT_HANDLE = -11
55
+ handle = kernel32.GetStdHandle(-11)
56
+ mode = ctypes.c_ulong()
57
+ if kernel32.GetConsoleMode(handle, ctypes.byref(mode)):
58
+ # ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
59
+ new_mode = mode.value | 0x0004
60
+ kernel32.SetConsoleMode(handle, new_mode)
61
+
62
+
63
+ enable_ansi()
64
+
49
65
  def get_shell():
50
66
  global _shell_process
51
67
 
@@ -81,7 +97,7 @@ def run_shell_command(command):
81
97
  try:
82
98
  if os.name == "nt":
83
99
  # Run the command, then print a unique completion marker.
84
- shell.stdin.write(
100
+ shell.stdin.write( #type:ignore
85
101
  f"{command}\r\n"
86
102
  f"echo {marker}\r\n"
87
103
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chemql-python
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: A chemistry-focused query language and REPL
5
5
  Author-email: Mohammad Rakibul Islam <rakibulofficial1017@gmail.com>
6
6
  Requires-Python: >=3.10
File without changes
File without changes
File without changes