6 Logix Modules

Logix has a module system similar to Python’s. Logix modules have the suffix “.lx” and are compiled to “.lxc” files. The limport statement will import Logix modules found on the standard PYTHONPATH. limport is not yet fully cooked: limport as is supported but there is no equivalent of Python’s from. Also, importing from packages has a quirky result:

[std]: limport mypackage.mymodule
[std]: mypackage
NameError: name 'mypackage' is not defined
[std]: mymodule
<module 'mypackage.mymodule' from 'mypackage/mymodule.lxc'>

In other words, limport a.b currently behaves more like from a limport b. This will change!

6.1 Packages

With the current implementation, Logix cannot be used to implement package files. If you wish to create a package, you must create a Python __init__.py file as usual. Once created in this manner, packages may contain Logix modules (.lx files).