Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
14 from PyQt4.QtCore import * 14 from PyQt4.QtCore import *
15 from PyQt4.QtGui import * 15 from PyQt4.QtGui import *
16 16
17 from E4Gui.E4Application import e4App 17 from E4Gui.E4Application import e4App
18 18
19 from Ui_SyntaxCheckerDialog import Ui_SyntaxCheckerDialog 19 from .Ui_SyntaxCheckerDialog import Ui_SyntaxCheckerDialog
20 20
21 import Utilities 21 import Utilities
22 22
23 class SyntaxCheckerDialog(QDialog, Ui_SyntaxCheckerDialog): 23 class SyntaxCheckerDialog(QDialog, Ui_SyntaxCheckerDialog):
24 """ 24 """
72 @param fn file or list of files or directory to be checked 72 @param fn file or list of files or directory to be checked
73 (string or list of strings) 73 (string or list of strings)
74 @param codestring string containing the code to be checked (string). 74 @param codestring string containing the code to be checked (string).
75 If this is given, file must be a single file name. 75 If this is given, file must be a single file name.
76 """ 76 """
77 if type(fn) is types.ListType: 77 if isinstance(fn, list):
78 files = fn 78 files = fn
79 elif os.path.isdir(fn): 79 elif os.path.isdir(fn):
80 files = Utilities.direntries(fn, 1, '*.py', 0) 80 files = Utilities.direntries(fn, 1, '*.py', 0)
81 files += Utilities.direntries(fn, 1, '*.pyw', 0) 81 files += Utilities.direntries(fn, 1, '*.pyw', 0)
82 files += Utilities.direntries(fn, 1, '*.ptl', 0) 82 files += Utilities.direntries(fn, 1, '*.ptl', 0)

eric ide

mercurial