Structuring our application directory
Just as logically breaking our program into separate concerns helps us manage the logical complexity of each component, physically breaking the code into multiple files helps us keep the complexity of each file manageable. It also reinforces more isolation between components; for example, you can't share global variables between files, and you know that if your models.py
file imports tkinter
, you're doing something wrong.
Basic directory structure
There is no official standard for laying out a Python application directory, but there are some common conventions that will help us keep things tidy and make it easier to package our software later on. Let's set up our directory structure.
To begin, create a directory called ABQ_Data_Entry
. This is the root directory of our application, so whenever we refer to the application root, this is it.
Under the application root, create another directory called abq_data_entry
....