PluginPyLint.py

changeset 52
2ffa0ba6917c
parent 50
beb6e8b9504f
child 53
018f049ec455
equal deleted inserted replaced
51:be48e5d52cac 52:2ffa0ba6917c
33 # Start-of-Header 33 # Start-of-Header
34 name = "PyLint Plugin" 34 name = "PyLint Plugin"
35 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 35 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
36 autoactivate = True 36 autoactivate = True
37 deactivateable = True 37 deactivateable = True
38 version = "6.1.2" 38 version = "6.1.3"
39 className = "PyLintPlugin" 39 className = "PyLintPlugin"
40 packageName = "PyLint" 40 packageName = "PyLint"
41 shortDescription = "Show the PyLint dialogs." 41 shortDescription = "Show the PyLint dialogs."
42 longDescription = """This plug-in implements the PyLint dialogs.""" \ 42 longDescription = """This plug-in implements the PyLint dialogs.""" \
43 """ PyLint is used to check Python source files according to various""" \ 43 """ PyLint is used to check Python source files according to various""" \
88 Private method to generate a program entry. 88 Private method to generate a program entry.
89 89
90 @param exe name of the executable program (string) 90 @param exe name of the executable program (string)
91 @return version string of detected version (string) 91 @return version string of detected version (string)
92 """ 92 """
93 version = '0.0.0'
93 proc = QProcess() 94 proc = QProcess()
94 proc.setProcessChannelMode(QProcess.MergedChannels) 95 proc.setProcessChannelMode(QProcess.MergedChannels)
95 proc.start(exe, ['--version']) 96 proc.start(exe, ['--version'])
96 finished = proc.waitForFinished(10000) 97 finished = proc.waitForFinished(10000)
97 if finished: 98 if finished:
102 for line in output.splitlines(): 103 for line in output.splitlines():
103 if versionRe.search(line): 104 if versionRe.search(line):
104 version = line.split()[-1] 105 version = line.split()[-1]
105 version = version[:-1] 106 version = version[:-1]
106 break 107 break
107 else:
108 version = '0.0.0'
109 return version 108 return version
110 109
111 110
112 def _findExecutable(majorVersion): 111 def _findExecutable(majorVersion):
113 """ 112 """

eric ide

mercurial