diff options
Diffstat (limited to 'src/setup/main.py')
-rw-r--r-- | src/setup/main.py | 62 |
1 files changed, 14 insertions, 48 deletions
diff --git a/src/setup/main.py b/src/setup/main.py index 1f05f10..c88cb46 100644 --- a/src/setup/main.py +++ b/src/setup/main.py @@ -2,60 +2,26 @@ ''' +#why? if __name__ == '__main__': pass -import os - -# using lxml for XML processing -from lxml import etree -from level import LevelInfo -from utils import utils - -# constants -ConfigFile = '/home/doug/workspace/Muthris/docs/examples/config.xml' -LevelExt = '.mlvl' - -# load the configuration file -config = utils.getXMLRoot(ConfigFile) - -#for each level folder, scan for and process any Muthris level files (.mlvl) -levels = [] -folders = config.xpath('//level-folders/folder/@location') -for folder in folders: - #search for files in the level folder - list = os.listdir(folder) - print(list) - for path in list: - #make sure path is not just the filename, as isfile() would fail if it was - path = folder + '/' + path - - #only want level files - if not os.path.isfile(path): - continue - if not path.endswith(LevelExt): - continue - - #create a level object for this level file - level = LevelInfo( path ) - levels.append( level ) - -print( config ) -print( folders ) - - - -# find all the level folders - -# load all the level folders -# start the menus +import sys +sys.path.append('/home/doug/workspace/Muthris/src/') -print( 'done' ) +import menus +from utils import strs +# setup logging +import logging +logging.basicConfig(filename=strs.LoggingFile,level=logging.DEBUG) +log = logging.getLogger('setup.main') -def processLevelFile( file ): - ''' ''' - pass +# start the menus + +menus.begin() + +print( 'done' ) |