EPANET-Python

From assela Pathirana
Revision as of 23:30, 7 January 2013 by Root (talk | contribs) (→‎Windows)
Jump to navigationJump to search
EPANET-Python can combine EPANET tools with sophisticated Python capabilities like this Matplotlib graph

When I started teaching programming for water professionals at UNESCO-IHE, I was compelled to use C/C++ as the language. This is due to the fact that EPANET2.0 and EPA-SWMM5.0 (Two main programes, students in my department had to learn) were written in C language. However, C/C++ is a horrible first language. Students have to cover at least three days of learning of arcane syntax and rules before they begin to write some semi-useful code. On the other hand, if I could conduct the classes in Python, they will see the `light' within a few hours! They can start doing interesting and useful things from the very beginning of the study. What a way to stimulate learning!

I wanted to make it possible to call EPANET2 and EPA-SWMM5.0 procedures from python. Following is the first attempt:

Download

How to use

Linux

Just use

pip install epanettools

or download from http://pypi.python.org/pypi/EPANETTOOLS and run as root

[sudo] python setup.py install

OS-X

Should work similar to Linux, but I don't have a Mac to test on :-)

Windows

Testing

  • go to ./src and run the epanet2_test.py

See Also