This repository contains an example of how to use the DESPythonMaker to convert a Supremica file with a synthesized supervisor into a Python project.
-
The file
setup.pyinstall the DESPythonMaker as submodule and configure a virtual environment in the folderapplication\env.- You can access DESPythonMaker in the main repository here
-
The file
convert.pyconvert the Supremica fileapplication_supremica_supervisor.wmodinto a Python project in the folderapplication\supervisor. -
See
application\main.pyfor an example of how to use the generated supervisor. -
The file
application\handle_event.pyis an personalization of the DESPythonMaker that handle the events of the supervisor. If you want to use the DESPythonMaker without personalization, you can delete this file and use the default DESPythonMaker located in the foldersupervisor\Supervisor\handle_event.py.- To do this, you have to change the import in
application\main.pyfromfrom handle_event import handle_eventtofrom supervisor import handle_event.
- To do this, you have to change the import in
-
For first use, you have to run
setup.pyto install the DESPythonMaker and create the virtual environment and runconvert.pyto convert the Supremica file into a Python project.