diff options
author | Brett Cannon <brett@python.org> | 2014-08-29 11:16:29 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-08-29 11:16:29 -0400 |
commit | 131810f8df6431ffef5d0cf345d67aeec7c3c605 (patch) | |
tree | d4c1219e564ccffc8feeb3b42785038a47cc14e6 /gui.py | |
parent | 2995e293950edc39b0466d1274affc1136c066c8 (diff) | |
download | pylint-131810f8df6431ffef5d0cf345d67aeec7c3c605.tar.gz |
Modernize to the point of working for Python 2.7 still
Diffstat (limited to 'gui.py')
-rw-r--r-- | gui.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,6 +14,7 @@ # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """Tkinker gui for pylint""" +from __future__ import print_function import os import sys @@ -86,7 +87,7 @@ class BasicStream(object): """finalize what the contents of the dict should look like before output""" for item in self.outdict: num_empty = self.outdict[item].count('') - for _ in xrange(num_empty): + for _ in range(num_empty): self.outdict[item].remove('') if self.outdict[item]: self.outdict[item].pop(0) @@ -503,7 +504,7 @@ def lint_thread(module, reporter, gui): def Run(args): """launch pylint gui from args""" if args: - print 'USAGE: pylint-gui\n launch a simple pylint gui using Tk' + print('USAGE: pylint-gui\n launch a simple pylint gui using Tk') sys.exit(1) gui = LintGui() gui.mainloop() |