コード例 #1
0
        try:
            os.remove(self.location + ".old")
        except Exception:
            pass

        self._saving = False
        self._dirty = False


location = xdg.get_config_dir()


# Provide a mechanism for setting up default settings for different platforms
if sys.platform == 'win32':
    __settings_file = 'settings-win32.ini'
elif sys.platform == 'darwin':
    __settings_file = 'settings-osx.ini'
else:
    __settings_file = 'settings.ini'


MANAGER = SettingsManager(
    os.path.join(location, "settings.ini"), xdg.get_config_path("settings.ini")
)

get_option = MANAGER.get_option
set_option = MANAGER.set_option

# vim: et sts=4 sw=4
コード例 #2
0
        try:
            os.remove(self.location + ".old")
        except:
            pass

        self._saving = False
        self._dirty = False
        
location = xdg.get_config_dir()


# Provide a mechanism for setting up default settings for different platforms
if sys.platform == 'win32':
    __settings_file = 'settings-win32.ini'
elif sys.platform == 'darwin':
    __settings_file = 'settings-osx.ini'    
else:
    __settings_file = 'settings.ini'


MANAGER = SettingsManager(
    os.path.join(location, "settings.ini"),
    xdg.get_config_path("settings.ini")
)

get_option = MANAGER.get_option
set_option = MANAGER.set_option

# vim: et sts=4 sw=4
コード例 #3
0
ファイル: settings.py プロジェクト: exaile/exaile
        try:
            os.remove(self.location + ".old")
        except Exception:
            pass

        self._saving = False
        self._dirty = False


location = xdg.get_config_dir()


# Provide a mechanism for setting up default settings for different platforms
if sys.platform == 'win32':
    __settings_file = 'settings-win32.ini'
elif sys.platform == 'darwin':
    __settings_file = 'settings-osx.ini'
else:
    __settings_file = 'settings.ini'


MANAGER = SettingsManager(
    os.path.join(location, "settings.ini"), xdg.get_config_path("settings.ini")
)

get_option = MANAGER.get_option
set_option = MANAGER.set_option

# vim: et sts=4 sw=4