pysys.constants module

Defines global constants that are used throughout the PySys framework.

The standard convention is to import all contents of the module so that the constants can be referenced directly. The module also contains methods for locating and parsing the PySys project file (pysys.constants.loadproject), and the project class that provides an abstraction over the contents of the file (pysys.constants.Project). For more information about the structure and contents of the project file, see the PySys examples distribution.

pysys.constants.loadproject(start)[source]

Load the PySys project file.

The method walks up the directory tree from the supplied path until the PySys project file is found. The location of the project file defines the project root location. The contents of the project file determine project specific constants as specified by property elements in the xml project file.

To ensure that all loaded modules have a pre-initialised projects instance, any launching application should first import the loadproject file, and then make a call to it prior to importing all names within the constants module.

Parameters:start – The initial path to start from when trying to locate the project file