Installation

Install Python

Download & Install Python from https://www.python.org/downloads/

Please install python Version >=3.5.

Warning

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.

Installing GraphViz

Install GraphViz from http://www.graphviz.org/Download.php

Then ensure that the bin/ subdirectory of the GraphViz installation is in your PATH.

Install Moddy

$ pip install -U moddy

Test Moddy

Copy the text from this Basic Demo and save it to 1_hello.py into an arbitrary directory on your machine.

Then try to run the demo:

$ python 1_hello.py

Demo output

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

Open 1_hello.html into a web browser and it should look like this The sequence diagram

Using Moddy with Eclipse

Note

This step is optional, you can use Moddy also without Eclipse. I just put it here because I personally use Eclipse.

Installing Eclipse

Download & Install Eclipse from https://eclipse.org/downloads/

Installing PyDev

In Eclipse, select Help->Install new Software and enter http://www.pydev.org/updates for both Name and location

_images/0500_pydev.png

Create a Moddy Project

In Eclipse Select New --> Project --> PyDev Project:

_images/0510_eclipse_new.png

Name the project myFirstModdyProject:

_images/0520_pydev.png

Create a module named 1_hello.py:

_images/0530_createmod.png

Copy the text from this Basic Demo and paste it into 1_hello.py.

Now you can Run the 1_hello.py. You should get an output as described in Demo output.