-
Notifications
You must be signed in to change notification settings - Fork 7
Extending functionality
Grinch_ edited this page Sep 29, 2021
·
2 revisions
These modules expose the functionality of the game to the python interpreter. Can be imported as normal python modules.
import cleo
from cleo import
import cleo as cl
To add your own modules, you can place them inside the PyLoader/lib folder. Do not place them inside the PyLoader/libstd as it is reserved for first-party modules.
For this, you need a local installation of python-pip. From there go to the PyLoader/lib folder run the command,
pip install <package_name> -t .
Creating python modules is pretty straightforward and requires no changes for PyLoader. Check here for examples. For creating advanced modules through C++ check the sample project here. More examples are here.