24 elif arg.startswith("--settings="): |
24 elif arg.startswith("--settings="): |
25 from PyQt5.QtCore import QSettings |
25 from PyQt5.QtCore import QSettings |
26 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
26 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
27 if not os.path.isdir(settingsDir): |
27 if not os.path.isdir(settingsDir): |
28 os.makedirs(settingsDir) |
28 os.makedirs(settingsDir) |
29 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, |
29 QSettings.setPath( |
30 settingsDir) |
30 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir) |
31 sys.argv.remove(arg) |
31 sys.argv.remove(arg) |
32 |
32 |
33 # make ThirdParty package available as a packages repository |
33 # make ThirdParty package available as a packages repository |
34 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
34 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
35 "ThirdParty", "Pygments")) |
35 "ThirdParty", "Pygments")) |