def __init__(self, installdir, statedir): self.installdir = installdir self.statedir = statedir self.config = self # Setup language files self.lang = Lang(self)
def __init__(self, abcpath, configpath): self.version = version_id self.abcpath = abcpath # Find the directory to save config files, etc. self.dir_root = configpath moveOldConfigFiles(self) self.setupConfig() # Setup language files self.lang = Lang(self) # Convert old INI file convertINI(self) # Make torrent directory (if needed) self.MakeTorrentDir() self.setupTorrentMakerConfig() self.setupTorrentList() self.torrents = { "all": [], "active": {}, "inactive": {}, "pause": {}, "seeding": {}, "downloading": {} } self.accessflag = Event() self.accessflag.set() self.invalidwinfilenamechar = '' for i in range(32): self.invalidwinfilenamechar += chr(i) self.invalidwinfilenamechar += '"*/:<>?\\|' self.FILESEM = Semaphore(1) warned = self.config.Read('torrentassociationwarned', 'int') if (sys.platform == 'win32' and not warned): self.regchecker = RegChecker(self) self.config.Write('torrentassociationwarned', '1') else: self.regchecker = None self.lastdir = {"save": "", "open": "", "log": ""} # Is ABC in the process of shutting down? self.abcquitting = False # self.abcdonequitting = False # Keep track of the last tab that was being viewed self.lasttab = {"advanced": 0, "preferences": 0} self.languages = {} # Keep track of all the "ManagedList" objects in use self.lists = {} self.abcfileframe = None self.abcbuddyframe = None