Component coding

Since we have already coded the foundation parts of the valves, pumps, and tanks, writing the instances of the specific components for our diagram is comparatively easy, as shown in the code listings that we will explain in this section.

We have split the components.py file into the following separate parts, with a discussion of each code listing following its respective part. Part 1 is the same introduction that we've seen before. If you look at the date for this listing compared to the previous ones, you'll see that it took about two months to complete the work on the foundation code. Of course, this work was done by one person, who also had other work projects to handle during the same time frame, but it's also a good ...

Get Learn Programming in Python with Cody Jackson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.