IncludeCPP 3.4.2__py3-none-any.whl → 3.4.10__py3-none-any.whl

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.
includecpp/__init__.py CHANGED
@@ -1,59 +1,59 @@
1
- from .core.cpp_api import CppApi
2
- from .core import cssl_bridge as CSSL
3
- import warnings
4
-
5
- __version__ = "3.4.2"
6
- __all__ = ["CppApi", "CSSL"]
7
-
8
- # Module-level cache for C++ modules
9
- _api_instance = None
10
- _loaded_modules = {}
11
-
12
- def _get_api():
13
- """Get or create singleton CppApi instance."""
14
- global _api_instance
15
- if _api_instance is None:
16
- _api_instance = CppApi()
17
- return _api_instance
18
-
19
- def __getattr__(name: str):
20
- """Enable: from includecpp import fast_list
21
-
22
- This hook is called when Python cannot find an attribute in this module.
23
- It allows dynamic C++ module loading via the import system.
24
- """
25
- if name.startswith('_'):
26
- raise AttributeError(f"module 'includecpp' has no attribute '{name}'")
27
-
28
- if name in _loaded_modules:
29
- return _loaded_modules[name]
30
-
31
- api = _get_api()
32
-
33
- if name not in api.registry:
34
- available = list(api.registry.keys())
35
- raise AttributeError(
36
- f"Module '{name}' not found. "
37
- f"Available: {available}. "
38
- f"Run 'includecpp rebuild' first."
39
- )
40
-
41
- if api.need_update(name):
42
- warnings.warn(
43
- f"Module '{name}' source files changed. "
44
- f"Run 'includecpp rebuild' to update.",
45
- UserWarning
46
- )
47
-
48
- module = api.include(name)
49
- _loaded_modules[name] = module
50
- return module
51
-
52
- def __dir__():
53
- """List available attributes including C++ modules."""
54
- base = ['CppApi', 'CSSL', '__version__']
55
- try:
56
- api = _get_api()
57
- return sorted(set(base + list(api.registry.keys())))
58
- except Exception:
59
- return base
1
+ from .core.cpp_api import CppApi
2
+ from .core import cssl_bridge as CSSL
3
+ import warnings
4
+
5
+ __version__ = "3.4.10"
6
+ __all__ = ["CppApi", "CSSL"]
7
+
8
+ # Module-level cache for C++ modules
9
+ _api_instance = None
10
+ _loaded_modules = {}
11
+
12
+ def _get_api():
13
+ """Get or create singleton CppApi instance."""
14
+ global _api_instance
15
+ if _api_instance is None:
16
+ _api_instance = CppApi()
17
+ return _api_instance
18
+
19
+ def __getattr__(name: str):
20
+ """Enable: from includecpp import fast_list
21
+
22
+ This hook is called when Python cannot find an attribute in this module.
23
+ It allows dynamic C++ module loading via the import system.
24
+ """
25
+ if name.startswith('_'):
26
+ raise AttributeError(f"module 'includecpp' has no attribute '{name}'")
27
+
28
+ if name in _loaded_modules:
29
+ return _loaded_modules[name]
30
+
31
+ api = _get_api()
32
+
33
+ if name not in api.registry:
34
+ available = list(api.registry.keys())
35
+ raise AttributeError(
36
+ f"Module '{name}' not found. "
37
+ f"Available: {available}. "
38
+ f"Run 'includecpp rebuild' first."
39
+ )
40
+
41
+ if api.need_update(name):
42
+ warnings.warn(
43
+ f"Module '{name}' source files changed. "
44
+ f"Run 'includecpp rebuild' to update.",
45
+ UserWarning
46
+ )
47
+
48
+ module = api.include(name)
49
+ _loaded_modules[name] = module
50
+ return module
51
+
52
+ def __dir__():
53
+ """List available attributes including C++ modules."""
54
+ base = ['CppApi', 'CSSL', '__version__']
55
+ try:
56
+ api = _get_api()
57
+ return sorted(set(base + list(api.registry.keys())))
58
+ except Exception:
59
+ return base
includecpp/__init__.pyi CHANGED
@@ -11,6 +11,9 @@ try:
11
11
  except ImportError:
12
12
  pass # Generated during rebuild
13
13
 
14
+ # CSSL module - CSO Service Script Language
15
+ from .core import cssl_bridge as CSSL
16
+
14
17
  __version__: str
15
18
 
16
19
  # Dynamic module access via: from includecpp import <module_name>
@@ -121,4 +124,4 @@ class CppApi:
121
124
  """List all available modules."""
122
125
  ...
123
126
 
124
- __all__: List[str]
127
+ __all__: List[str] # Includes: CppApi, CSSL, __version__
@@ -7455,9 +7455,8 @@ def cssl_exec(path, code):
7455
7455
  try:
7456
7456
  result = cssl_lang.exec(source)
7457
7457
 
7458
- # Print output buffer
7459
- for line in cssl_lang.get_output():
7460
- click.echo(line)
7458
+ # Output is already printed to stdout during execution via runtime.output()
7459
+ # No need to print buffer again - this was causing double output
7461
7460
 
7462
7461
  if result is not None:
7463
7462
  click.echo(f"Result: {result}")
@@ -19,9 +19,10 @@ from .cssl_parser import (
19
19
  from .cssl_runtime import CSSLRuntime, CSSLRuntimeError, CSSLServiceRunner, run_cssl, run_cssl_file
20
20
  from .cssl_types import (
21
21
  DataStruct, Shuffled, Iterator, Combo, DataSpace, OpenQuote,
22
- OpenFind,
22
+ OpenFind, Parameter, Stack, Vector,
23
23
  create_datastruct, create_shuffled, create_iterator,
24
- create_combo, create_dataspace, create_openquote
24
+ create_combo, create_dataspace, create_openquote, create_parameter,
25
+ create_stack, create_vector
25
26
  )
26
27
 
27
28
  __all__ = [
@@ -34,7 +35,8 @@ __all__ = [
34
35
  'run_cssl', 'run_cssl_file',
35
36
  # Data Types
36
37
  'DataStruct', 'Shuffled', 'Iterator', 'Combo', 'DataSpace', 'OpenQuote',
37
- 'OpenFind',
38
+ 'OpenFind', 'Parameter', 'Stack', 'Vector',
38
39
  'create_datastruct', 'create_shuffled', 'create_iterator',
39
- 'create_combo', 'create_dataspace', 'create_openquote'
40
+ 'create_combo', 'create_dataspace', 'create_openquote', 'create_parameter',
41
+ 'create_stack', 'create_vector'
40
42
  ]