11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtCore import QObject, QProcess, pyqtSlot |
13 from PyQt6.QtCore import QObject, QProcess, pyqtSlot |
14 from PyQt6.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu |
14 from PyQt6.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu |
15 |
15 |
16 from eric7 import Utilities |
|
17 from eric7.EricGui.EricAction import EricAction |
16 from eric7.EricGui.EricAction import EricAction |
18 from eric7.EricWidgets import EricMessageBox |
17 from eric7.EricWidgets import EricMessageBox |
19 from eric7.EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets.EricApplication import ericApp |
|
19 |
|
20 try: |
|
21 from eric7.SystemUtilities.FileSystemUtilities import isinpath |
|
22 except ImportError: |
|
23 # imports for eric < 23.1 |
|
24 from eric7.Utilities import isinpath |
20 |
25 |
21 from ..FlaskCommandDialog import FlaskCommandDialog |
26 from ..FlaskCommandDialog import FlaskCommandDialog |
22 |
27 |
23 |
28 |
24 # TODO: add a submenu with action for the commands with command options |
29 # TODO: add a submenu with action for the commands with command options |
315 |
320 |
316 @return flag indicating the availability of 'flask-babel' |
321 @return flag indicating the availability of 'flask-babel' |
317 @rtype bool |
322 @rtype bool |
318 """ |
323 """ |
319 interpreter = self.__project.getVirtualenvInterpreter() |
324 interpreter = self.__project.getVirtualenvInterpreter() |
320 if interpreter and Utilities.isinpath(interpreter): |
325 if interpreter and isinpath(interpreter): |
321 detector = os.path.join( |
326 detector = os.path.join( |
322 os.path.dirname(__file__), "FlaskMigrateDetector.py" |
327 os.path.dirname(__file__), "FlaskMigrateDetector.py" |
323 ) |
328 ) |
324 proc = QProcess() |
329 proc = QProcess() |
325 proc.setProcessChannelMode(QProcess.ProcessChannelMode.MergedChannels) |
330 proc.setProcessChannelMode(QProcess.ProcessChannelMode.MergedChannels) |