Wed, 19 May 2021 19:53:36 +0200
Continued porting eric to PyQt6.
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
7923
91e843545d9a
Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7780
diff
changeset
|
3 | # Copyright (c) 2009 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing the Debugger Python3 configuration page. |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
10 | from PyQt6.QtCore import pyqtSlot |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
11 | |
6346
92ed63434dce
Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6048
diff
changeset
|
12 | from E5Gui.E5Application import e5App |
4574
86647045bc03
Changed the Python3 debugger page to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4021
diff
changeset
|
13 | from E5Gui.E5PathPicker import E5PathPickerModes |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | |
12
1d8dd9706f46
First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7
diff
changeset
|
15 | from .ConfigurationPageBase import ConfigurationPageBase |
1d8dd9706f46
First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7
diff
changeset
|
16 | from .Ui_DebuggerPython3Page import Ui_DebuggerPython3Page |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | import Preferences |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
19 | import UI.PixmapCache |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | |
945
8cd4d08fa9f6
Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
882
diff
changeset
|
21 | |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | class DebuggerPython3Page(ConfigurationPageBase, Ui_DebuggerPython3Page): |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | Class implementing the Debugger Python3 configuration page. |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | def __init__(self): |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | Constructor |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | """ |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7923
diff
changeset
|
30 | super().__init__() |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | self.setupUi(self) |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | self.setObjectName("DebuggerPython3Page") |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | |
6346
92ed63434dce
Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6048
diff
changeset
|
34 | try: |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
35 | self.__virtualenvManager = e5App().getObject("VirtualEnvManager") |
6346
92ed63434dce
Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6048
diff
changeset
|
36 | except KeyError: |
92ed63434dce
Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6048
diff
changeset
|
37 | from VirtualEnv.VirtualenvManager import VirtualenvManager |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
38 | self.__virtualenvManager = VirtualenvManager() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
39 | |
7533
88261c96484b
Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7360
diff
changeset
|
40 | self.venvDlgButton.setIcon(UI.PixmapCache.getIcon("virtualenv")) |
3186
a05eff845522
Changed all the file or directory selection buttons to QToolButton and gave them an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3160
diff
changeset
|
41 | |
8327
666c2b81cbb7
Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8318
diff
changeset
|
42 | self.debugClientPicker.setMode(E5PathPickerModes.OPEN_FILE_MODE) |
4574
86647045bc03
Changed the Python3 debugger page to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4021
diff
changeset
|
43 | self.debugClientPicker.setToolTip(self.tr( |
86647045bc03
Changed the Python3 debugger page to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4021
diff
changeset
|
44 | "Press to select the Debug Client via a file selection dialog")) |
4575
464a6b049f89
Changed the Python2 debugger and Editor APIs pages to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4574
diff
changeset
|
45 | self.debugClientPicker.setFilters(self.tr("Python Files (*.py *.py3)")) |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
47 | self.__populateAndSetVenvComboBox() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
48 | |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | # set initial values |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | dct = Preferences.getDebugger("DebugClientType3") |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | if dct == "standard": |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | self.standardButton.setChecked(True) |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | else: |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | self.customButton.setChecked(True) |
4574
86647045bc03
Changed the Python3 debugger page to use the path picker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4021
diff
changeset
|
55 | self.debugClientPicker.setText( |
5059
b619cb765507
Fixed a few bugs in the debugger interface and configuration pages related to path separator of different operating systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4631
diff
changeset
|
56 | Preferences.getDebugger("DebugClient3"), toNative=False) |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | self.pyRedirectCheckBox.setChecked( |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | Preferences.getDebugger("Python3Redirect")) |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | self.pyNoEncodingCheckBox.setChecked( |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
60 | Preferences.getDebugger("Python3NoEncoding")) |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
61 | self.sourceExtensionsEdit.setText( |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
62 | Preferences.getDebugger("Python3Extensions")) |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
63 | |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | def save(self): |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | Public slot to save the Debugger Python configuration. |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | """ |
6357
ceb3d7c25650
DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6349
diff
changeset
|
68 | Preferences.setDebugger( |
ceb3d7c25650
DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6349
diff
changeset
|
69 | "Python3VirtualEnv", |
ceb3d7c25650
DebuggerPythonPage, DebuggerPython3Page: fixed an issue causing an empty virtual environment selection to not being saved.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6349
diff
changeset
|
70 | self.venvComboBox.currentText()) |
8234
fcb6b4b96274
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8218
diff
changeset
|
71 | dct = "standard" if self.standardButton.isChecked() else "custom" |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | Preferences.setDebugger("DebugClientType3", dct) |
3025
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
73 | Preferences.setDebugger( |
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
74 | "DebugClient3", |
5059
b619cb765507
Fixed a few bugs in the debugger interface and configuration pages related to path separator of different operating systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
4631
diff
changeset
|
75 | self.debugClientPicker.text(toNative=False)) |
3025
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
76 | Preferences.setDebugger( |
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
77 | "Python3Redirect", |
7
c679fb30c8f3
Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
0
diff
changeset
|
78 | self.pyRedirectCheckBox.isChecked()) |
3025
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
79 | Preferences.setDebugger( |
67064c71df21
Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2964
diff
changeset
|
80 | "Python3NoEncoding", |
7
c679fb30c8f3
Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
0
diff
changeset
|
81 | self.pyNoEncodingCheckBox.isChecked()) |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
82 | |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
83 | def __populateAndSetVenvComboBox(self): |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
84 | """ |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
85 | Private method to populate and set the virtual environment combo box. |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
86 | """ |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
87 | self.venvComboBox.clear() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
88 | self.venvComboBox.addItems( |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
89 | [""] + |
7635
0cdead130a81
Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7533
diff
changeset
|
90 | sorted(self.__virtualenvManager.getVirtualenvNames()) |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
91 | ) |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
92 | |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
93 | # set initial value |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
94 | venvName = Preferences.getDebugger("Python3VirtualEnv") |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
95 | if venvName: |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
96 | index = self.venvComboBox.findText(venvName) |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
97 | if index < 0: |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
98 | index = 0 |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
99 | self.venvComboBox.setCurrentIndex(index) |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
100 | |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
101 | @pyqtSlot() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
102 | def on_refreshButton_clicked(self): |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
103 | """ |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
104 | Private slot handling a click of the refresh button. |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
105 | """ |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
106 | self.sourceExtensionsEdit.setText( |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
107 | Preferences.getDebugger("Python3Extensions")) |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
108 | |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
109 | @pyqtSlot() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
110 | def on_venvDlgButton_clicked(self): |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
111 | """ |
6386
91dc4fa9bc9c
Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6381
diff
changeset
|
112 | Private slot to show the virtual environment manager dialog. |
6381
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
113 | """ |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
114 | self.__virtualenvManager.showVirtualenvManagerDialog(modal=True) |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
115 | self.__populateAndSetVenvComboBox() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
116 | self.activateWindow() |
37f23590dbbc
Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6357
diff
changeset
|
117 | self.raise_() |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | |
945
8cd4d08fa9f6
Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
882
diff
changeset
|
119 | |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
120 | def create(dlg): |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
121 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
122 | Module function to create the configuration page. |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
123 | |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
124 | @param dlg reference to the configuration dialog |
2964
84b65fb9e780
Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2302
diff
changeset
|
125 | @return reference to the instantiated page (ConfigurationPageBase) |
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
126 | """ |
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
127 | page = DebuggerPython3Page() |
880
52ed20236a1c
Added the option to not use the native file dialog to prevent crashes on Linux.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
791
diff
changeset
|
128 | return page |