Download & Install Python from https://www.python.org/downloads/
Please install python Version >=3.5.
Moddy does not support Python 2.x.
During install, click checkbox
add python to PATH
Tested with python 3.5, 3.6 and 3.7 under Windows 10.
Install GraphViz from http://www.graphviz.org/Download.php
Then ensure that the
bin/ subdirectory of the GraphViz installation is in your
$ pip install -U moddy
Copy the text from
this Basic Demo and save it to
into an arbitrary directory on your machine.
Then try to run the demo:
$ python 1_hello.py
The console log should end with
TRC: 11.8s STA Bob(Part) // TRC: 11.8s >MSG Bob.mouth(OutPort) // req=11.8s beg=11.8s end=12.8s dur=1.0s msg=[Hm?] SIM: Stops because stop_time reached SIM: Simulator stopped at 12.0s. Executed 9 events in 0.000 seconds saved sequence diagram in output/1_hello.html as iaViewer Saved structure graph to output/1_hello_structure.svg saved output/1_hello.csv as CSV
You should also find a folder
output in your directory that contains the result files:
| 1_hello.py | +---output 1_hello.csv 1_hello.html 1_hello_structure.svg
1_hello.html into a web browser and it should look like this
The sequence diagram
Using Moddy with Eclipse¶
This step is optional, you can use Moddy also without Eclipse. I just put it here because I personally use Eclipse.
In Eclipse, select
Help->Install new Software and enter http://www.pydev.org/updates for both Name and location