Table of Contents
Allows access to the contents of a MineSight® Compass project file via a ProjectInfo object.
The project file often contains critical information needed to compose a runfile. This module gives a clean way to,
- load in a project file
- access the contents of a project file
- mutate and commit those contents of the project file
Note
Changes to a ProjectInfo will not be persisted until a save() method is executed. This is because we keep a local copy of the Project files contents (for quick access), and modifications to the local copy do not effect the on-disk copy.
Contains information read from a MineSight® Compass project file.
Allows you to load a project file and access a local copy of the project files contents. In addition you can mutate the local copy and (optional) commit those mutations via the save() method.
ProjectInfo can be loaded either from the constructor or via the load() method.
Usage:
Accessing the contents of a ProjectInfo file is done much the same as accessing the contents of a dictionary. An example would be,
to change the contents of a the "file08" parameter you would:
The loadfrom path indicates what project file should be read in order to construct the ProjectInfo object. A default value of None implies that an empty ProjectInfo object is constructed.
Retrieves the contents of a project file for this object.
Opens the project file, loads the resources, and closes the project file (to allow other file access/manipulations).
Commits the local copy of the ProjectInfo object to original path.
Takes the contents of the local ProjectInfo and commits it to the path that was originally used to load the ProjectInfo.
[1] | "Built-in Exceptions" Python Library Reference. 19 December 2001. 1 June 2004. <http://www.python.org/doc/2.2/lib/module-exceptions.html> |