10. Modules & System Integration
Aergia code can load external resources either from separate .aer files or tap natively directly into Python’s vast package index.
+> expr prefixOpen Import: Parses and executes an external.aersource file path.+< expr prefixClosed Import: Parses and executes an external.aersource file path, mapping its internal namespace elements cleanly behind a safety string prefix:prefix.module_item.*> moduleOpen Python Import: Imports a native Python module directly into the global execution namespace.*< module prefixClosed Python Import: Imports a native Python module and maps its internal namespace elements in the same way that normal closed imports do:prefix.module_item.; exprEval Execution: Evaluates raw string sequences directly as Aergia source tokens at runtime.~> exprExit Engine: Halts the interpreter process immediately with the status code provided byexpr.
Examples
# Import local helper library
+> "utils.aer"
# Native Open Python Import
*> math
= root_val @sqrt:16: # Access via global env
# Closed Python Import
*< random rand
# Available via custom namespace binding
= roll @rand.randint:1 6:
# Evaluate code directly from a string sequence
; "= dynamic 100"
# Stop execution and exit immediately with status 0
~> 0