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.py
install 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.py
convert the Supremica fileapplication_supremica_supervisor.wmod
into a Python project in the folderapplication\supervisor
. -
See
application\main.py
for an example of how to use the generated supervisor. -
The file
application\handle_event.py
is 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.py
fromfrom handle_event import handle_event
tofrom supervisor import handle_event
.
- To do this, you have to change the import in
-
For first use, you have to run
setup.py
to install the DESPythonMaker and create the virtual environment and runconvert.py
to convert the Supremica file into a Python project.