Mercurial > traipse_dev
view upmana/validate.py @ 233:196853e0f455 alpha
Traipse Alpha 'OpenRPG' {100615-01}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary (Closed)
New Features:
New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order
New to Server GUI, can now clear log
Updates:
Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence.
Fixes:
Fix to InterParse that was causing an Infernal Loop with Namespace Internal
Fix to XML data, removed old Minidom and switched to Element Tree
Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread
Fix to metaservers.xml file not being created
Fix to Single and Double quotes in Whiteboard text
Fix to Background images not showing when using the Image Server
Fix to Duplicate chat names appearing
Fix to Server GUI's logging output
Fix to FNB.COLORFUL_TABS bug.
author | sirebral |
---|---|
date | Tue, 15 Jun 2010 16:17:11 -0500 |
parents | b633f4c64aae |
children |
line wrap: on
line source
from orpg.dirpath import dir_struct import os class Validate: def __init__(self, userpath=None): if userpath is None: userpath = dir_struct["home"] + os.sep + 'upmana' + os.sep self.__loadUserPath = userpath def config_file(self, user_file, template_file): #STEP 1: verify the template exists if (not os.path.exists(self.__loadUserPath + template_file)): return 0 #STEP 2: verify the user file exists. If it doesn't then create it from template if (not os.path.exists(self.__loadUserPath + user_file)): default = open(self.__loadUserPath + template_file,"r") file = default.read() newfile = open(self.__loadUserPath + user_file,"w") newfile.write(file) default.close() newfile.close() return 2 #returning 2 (True) so calling method will know if file was created #STEP 3: user file exists (is openable) return 1 indicating no-create operation required else: return 1 def ini_entry(self, entry_name, ini_file): pass validate = Validate()