Package parpg :: Module settings
[hide private]
[frames] | no frames]

Module settings

source code

Provides a class used for reading and writing various configurable options
throughout the game

This class produces an INI formated settings file as opposed to an XML
formatted one. The reason that python's built-in ConfigurationParser isn't 
sufficient is because comments aren't preserved when writing a settings
file, the order in which the options are written isn't preserved, and the 
interface used with this class is arguably more convenient that
ConfigParser's.

Default Settings may be generated by envoking this module from the
command line:
    python -m settings.py [system] [data_directory]

where [system] is one of local, windows, or linux (mac coming soon),
and data_directory is the base path for the data files to be loaded.

Both [system] and [data_directory] are option. If omitted, both
default to whichever what is reasonable based on the system settings.py
is run on

Classes [hide private]
  Section
An object that represents a section in a settings file.
  Settings
An object that represents a settings file, its sectons, and the options defined within those sections.
Variables [hide private]
  DEFAULT_SETTINGS = '[fife]\n#---------------------------------...
  __package__ = 'parpg'
Variables Details [hide private]

DEFAULT_SETTINGS

Value:
'''[fife]
#---------------------------------------------------------------------\
---------
# Options marked with ? are untested/unknown

# Game window\'s title (string) DO NOT EDIT!
WindowTitle = PARPG Techdemo 2

...