Kivy logic file

The first thing we will work on is the Python logic for our application. It is demonstrated in the multi-part listing of hmilayout.py, as follows:

# hmilayout.py (part 1)1  import sys2  sys.path.extend(["/home/cody/PycharmProjects/VirtualPLC"])34  import Models.FuelFarm.components as components5  import Models.FuelFarm.functionality as functionality67  from kivy.app import App8  from kivy.uix.pagelayout import PageLayout9  from kivy.config import Config1011 import kivy12 kivy.require("1.10.0")

In part 1, we import all of the important modules that we will need. Lines 1 and 2 show the path extension code to ensure the smooth attempt to execute the program. Lines 4 and 5 assign alias names to the components.py and functionality.py ...

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.