def __init__(self): # TODO Use `import preferences`? self.savefile = os.path.join(portability.get_home_directory(), ".comixlast") # Create the file if it doesn't exist, otherwise open it. if not os.path.isfile(self.savefile): self._savefile = open(self.savefile, "w+") else: self._savefile = open(self.savefile, "r+") # Read the file into a list self._archives = [] self._archives = self._read_file(self._savefile) self._current_entry = False;
"""constants.py - Miscellaneous constants.""" import os import portability VERSION = '4.0.5' HOME_DIR = portability.get_home_directory() CONFIG_DIR = portability.get_config_directory() DATA_DIR = portability.get_data_directory()