diff -r 1ff0929aab09 -r afe0da217745 eric6_webbrowser.py --- a/eric6_webbrowser.py Tue Jul 28 19:19:23 2015 +0200 +++ b/eric6_webbrowser.py Sat Aug 01 13:41:33 2015 +0200 @@ -17,7 +17,7 @@ import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ try: # Only for Py2 - import Utilities.compatibility_fixes # __IGNORE_WARNING__ + import Globals.compatibility_fixes # __IGNORE_WARNING__ except (ImportError): pass @@ -30,13 +30,20 @@ import sys import os -for arg in sys.argv: +for arg in sys.argv[:]: if arg.startswith("--config="): import Globals configDir = arg.replace("--config=", "") Globals.setConfigDir(configDir) sys.argv.remove(arg) - break + elif arg.startswith("--settings="): + from PyQt5.QtCore import QSettings + settingsDir = os.path.expanduser(arg.replace("--settings=", "")) + if not os.path.isdir(settingsDir): + os.makedirs(settingsDir) + QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, + settingsDir) + sys.argv.remove(arg) # make ThirdParty package available as a packages repository sys.path.insert(2, os.path.join(os.path.dirname(__file__), @@ -81,7 +88,9 @@ options = [ ("--config=configDir", "use the given directory as the one containing the config files"), - ("--search=word", "search for the given word") + ("--search=word", "search for the given word"), + ("--settings=settingsDir", + "use the given directory to store the settings files"), ] appinfo = AppInfo.makeAppInfo(sys.argv, "eric6 Web Browser",