def __init__(self, rootFrame, scriptDir, logger, mummy): self.tabFrame = rootFrame self.scriptDir = scriptDir self.logger = logger self.mummy = mummy self.configuration = conf.loadConf( os.path.join(self.scriptDir, utils.confDir, utils.getConfFilename('retroarch'))) self.logger.log('Loaded ' + utils.getConfFilename('retroarch')) self.guiVars = dict() self.guiStrings = utils.loadUIStrings( self.scriptDir, utils.getGuiStringsFilename('retroarch'))
def __init__(self, rootFrame, scriptDir, logger, mummy, hardware): self.tabFrame = rootFrame self.scriptDir = scriptDir self.logger = logger self.mummy = mummy self.hardware = hardware self.configuration = conf.loadConf( os.path.join(self.scriptDir, utils.confDir, utils.getConfFilename('retroarch-'+self.hardware))) self.logger.log('Loaded ' + utils.getConfFilename('retroarch-'+self.hardware)) self.guiVars = dict() self.guiStrings = utils.loadUIStrings(self.scriptDir, utils.getGuiStringsFilename('retroarch-'+self.hardware)) # Init all components self.romsetFrame = None self.selectExportDirButton = None self.imagesFrame = None self.parametersFrame = None self.preferedSetLabel = None self.preferedSetComboBox = None self.preferedSetValues = None self.preferedSetForGenreFrame = None self.usePreferedSetForGenreCheckButton = None self.beatEmUpPreferedSetLabel = None self.beatEmUpPreferedSetComboBox = None self.gunPreferedSetLabel = None self.gunPreferedSetComboBox = None self.miscPreferedSetLabel = None self.miscPreferedSetComboBox = None self.platformPreferedSetLabel = None self.platformPreferedSetComboBox = None self.puzzlePreferedSetLabel = None self.puzzlePreferedSetComboBox = None self.racePreferedSetLabel = None self.racePreferedSetComboBox = None self.runNGunPreferedSetLabel = None self.runNGunPreferedSetComboBox = None self.shootEmUpPreferedSetLabel = None self.shootEmUpPreferedSetComboBox = None self.sportPreferedSetLabel = None self.sportPreferedSetComboBox = None self.vsFightingPreferedSetLabel = None self.vsFightingPreferedSetComboBox = None self.buttonsFrame = None self.verifyButton = None self.saveButton = None self.proceedButton = None
def __init__(self,scriptDir,logger,title,cache) : self.scriptDir = scriptDir self.setKey='exo' self.cache = cache # TODO create conf file from guiStrings if it doesn't exist and do not ship it with tool anymore self.configuration = conf.loadConf(os.path.join(self.scriptDir,util.confDir,util.getConfFilename(self.setKey))) self.guiVars = dict() self.guiStrings = util.loadUIStrings(self.scriptDir, util.getGuiStringsFilename(self.setKey)) self.window = Tk.Tk() self.window.resizable(False,False) self.startFontSize = self.DEFAULT_FONT_SIZE if platform.system() == 'Windows' : self.window.iconbitmap('exodosicon.ico') self.setFontSize(self.startFontSize) self.window.title(title) self.logger = logger self.fullnameToGameDir = dict()
def rehash(irc, source, args): """takes no arguments. Reloads the configuration file for PyLink, (dis)connecting added/removed networks. Plugins must be manually reloaded.""" utils.checkAuthenticated(irc, source, allowOper=False) old_conf = conf.conf.copy() fname = conf.fname try: new_conf = conf.loadConf(fname, errors_fatal=False) except Exception as e: # Something went wrong, abort. log.exception("Error REHASH'ing config: ") irc.reply("Error loading configuration file: %s: %s" % (type(e).__name__, e)) return else: new_conf = conf.validateConf(new_conf) conf.conf = new_conf for network, ircobj in world.networkobjects.copy().items(): # Server was removed from the config file, disconnect them. log.debug('(%s) rehash: checking if %r is in new conf still.', irc.name, network) if network not in new_conf['servers']: log.debug( '(%s) rehash: removing connection to %r (removed from config).', irc.name, network) # Disable autoconnect first. ircobj.serverdata['autoconnect'] = -1 ircobj.aborted.set() del world.networkobjects[network] else: ircobj.conf = new_conf ircobj.serverdata = new_conf['servers'][network] ircobj.botdata = new_conf['bot'] for network, sdata in new_conf['servers'].items(): # New server was added. Connect them if not already connected. if network not in world.networkobjects: proto = utils.getProtoModule(sdata['protocol']) world.networkobjects[network] = classes.Irc( network, proto, new_conf) irc.reply("Done.")
#!/usr/lib/python2.7/ # -*- coding: utf-8 -*- import sys, os.path, conf from gui import GUI from logger import Logger scriptDir = r"" outputDir = r"output" confFile = r"conf.conf" scriptDir = r"" favorites = dict() configuration = dict() usingSystems = [] if __name__ == "__main__": scriptDir = os.path.abspath(os.path.dirname(sys.argv[0])) logger = Logger() logger.log('Script path : ' + scriptDir) # load conf.conf configuration = conf.loadConf(os.path.join(scriptDir, confFile)) gui = GUI(configuration, scriptDir, logger) logger.log('\n<--------- Load Configuration File --------->') logger.printDict(configuration) gui.draw() #TODO exit terminal when GUI is closed
def __init__(self, scriptDir, logger, title): self.scriptDir = scriptDir self.setKey = 'exo' self.cache = None self.loading = True # TODO create conf file from guiStrings if it doesn't exist and do not ship it with tool anymore self.configuration = conf.loadConf( os.path.join(self.scriptDir, util.confDir, util.getConfFilename(self.setKey))) self.guiVars = dict() self.guiStrings = util.loadUIStrings( self.scriptDir, util.getGuiStringsFilename(self.setKey)) self.fullnameToGameDir = util.fullnameToGameDir( scriptDir, self.configuration['collectionVersion']) self.window = Tk.Tk() self.window.resizable(False, False) self.window.geometry('+50+50') self.startFontSize = self.DEFAULT_FONT_SIZE if platform.system() == 'Windows': self.window.iconbitmap('exodosicon.ico') self.setFontSize(self.startFontSize) self.window.title(title) self.logger = logger # Init all components self.root = None self.mainFrame = None self.pathsFrame = None self.collectionEntry = None self.selectCollectionDirButton = None self.outputEntry = None self.selectOutputDirButton = None self.configurationFrame = None self.collectionFrame = None self.versionFrame = None self.collectionVersionLabel = None self.conversionTypeComboBox = None self.conversionTypeValues = None self.downloadOnDemandCheckButton = None self.mapperLabel = None self.mapperComboBox = None self.mapperValues = None self.preExtractGamesCheckButton = None self.conversionFrame = None self.conversionFirstLineFrame = None self.conversionTypeLabel = None self.debugModeCheckButton = None self.useGenreSubFolderCheckButton = None self.expertModeCheckButton = None self.mountPrefixEntry = None self.conversionSecondLineFrame = None self.vsyncCfgCheckButton = None self.fullResolutionCfgEntry = None self.rendererCfgEntry = None self.outputCfgEntry = None self.selectionFrame = None self.filterEntry = None self.customSelectionFrame = None self.selectionPathEntry = None self.selectSelectionPathButton = None self.leftFrame = None self.leftListLabel = None self.selectAllGamesButton = None self.exoGamesValues = None self.exoGamesListbox = None self.buttonsColumnFrame = None self.selectGameButton = None self.deselectGameButton = None self.rightFrame = None self.rightListLabel = None self.unselectAllGamesButton = None self.loadCustomButton = None self.saveCustomButton = None self.selectedGamesValues = None self.selectedGamesListbox = None self.buttonsFrame = None self.verifyButton = None self.saveButton = None self.proceedButton = None self.consoleFrame = None self.logTest = None self.scrollbar = None