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