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_TabnannyDialog import Ui_TabnannyDialog |
19 from .Ui_TabnannyDialog import Ui_TabnannyDialog |
20 |
20 |
21 import Tabnanny |
21 from . import Tabnanny |
22 import Utilities |
22 import Utilities |
23 |
23 |
24 class TabnannyDialog(QDialog, Ui_TabnannyDialog): |
24 class TabnannyDialog(QDialog, Ui_TabnannyDialog): |
25 """ |
25 """ |
26 Class implementing a dialog to show the results of the tabnanny check run. |
26 Class implementing a dialog to show the results of the tabnanny check run. |
66 Public slot to start the tabnanny check. |
66 Public slot to start the tabnanny check. |
67 |
67 |
68 @param fn File or list of files or directory to be checked |
68 @param fn File or list of files or directory to be checked |
69 (string or list of strings) |
69 (string or list of strings) |
70 """ |
70 """ |
71 if type(fn) is types.ListType: |
71 if isinstance(fn, list): |
72 files = fn |
72 files = fn |
73 elif os.path.isdir(fn): |
73 elif os.path.isdir(fn): |
74 files = Utilities.direntries(fn, 1, '*.py', 0) |
74 files = Utilities.direntries(fn, 1, '*.py', 0) |
75 files += Utilities.direntries(fn, 1, '*.pyw', 0) |
75 files += Utilities.direntries(fn, 1, '*.pyw', 0) |
76 files += Utilities.direntries(fn, 1, '*.ptl', 0) |
76 files += Utilities.direntries(fn, 1, '*.ptl', 0) |