eric6_configure.py

branch
maintenance
changeset 6646
51eefa621de4
parent 6645
ad476851d7e0
equal deleted inserted replaced
6603:77189681b787 6646:51eefa621de4
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # Copyright (c) 2006 - 2018 Detlev Offenbach <detlev@die-offenbachs.de> 4 # Copyright (c) 2006 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
5 # 5 #
6 6
7 """ 7 """
8 Eric6 Configure. 8 Eric6 Configure.
9 9
35 os.makedirs(settingsDir) 35 os.makedirs(settingsDir)
36 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, 36 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
37 settingsDir) 37 settingsDir)
38 sys.argv.remove(arg) 38 sys.argv.remove(arg)
39 39
40 from Globals import qVersionTuple
41 if qVersionTuple() < (5, 6, 0):
42 WEBENGINE_AVAILABLE = False
43 else:
44 try:
45 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
46 WEBENGINE_AVAILABLE = True
47 except ImportError:
48 WEBENGINE_AVAILABLE = False
49
50 # make ThirdParty package available as a packages repository 40 # make ThirdParty package available as a packages repository
51 sys.path.insert(2, os.path.join(os.path.dirname(__file__), 41 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
52 "ThirdParty", "Pygments")) 42 "ThirdParty", "Pygments"))
53 sys.path.insert(2, os.path.join(os.path.dirname(__file__), 43 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
54 "ThirdParty", "EditorConfig")) 44 "ThirdParty", "EditorConfig"))
64 54
65 @param argv list of commandline parameters (list of strings) 55 @param argv list of commandline parameters (list of strings)
66 @return reference to the main widget (QWidget) 56 @return reference to the main widget (QWidget)
67 """ 57 """
68 from Preferences.ConfigurationDialog import ConfigurationWindow 58 from Preferences.ConfigurationDialog import ConfigurationWindow
69 w = ConfigurationWindow(webEngine=WEBENGINE_AVAILABLE) 59 w = ConfigurationWindow()
70 w.show() 60 w.show()
71 w.showConfigurationPageByName("empty") 61 w.showConfigurationPageByName("empty")
72 return w 62 return w
73 63
74 64

eric ide

mercurial