Closed BradleyA closed 6 years ago
https://docs.python.org/3/reference/datamodel.html
Predefined (writable) attributes: __name__ is the module’s name; __doc__ is the module’s
documentation string, or None if unavailable; __annotations__ (optional) is a dictionary
containing variable annotations collected during module body execution; __file__ is
the pathname of the file from which the module was loaded, if it was loaded from a file.
The __file__ attribute may be missing for certain types of modules, such as C modules
that are statically linked into the interpreter; for extension modules loaded dynamically
from a shared library, it is the pathname of the shared library file.
https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory Documentation references for the modules, constants and functions used above:
The os and os.path modules.
The __file__ constant
os.path.realpath(path) (returns "the canonical path of the specified filename, eliminating any symbolic links encountered in the path")
os.path.dirname(path) (returns "the directory name of pathname path")
os.getcwd() (returns "a string representing the current working directory")
os.chdir(path) ("change the current working directory to path")
add pi-display/scrollphat/help-message.py debug statement