diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2013-05-05 21:47:15 +0200 |
---|---|---|
committer | hasufell <julian.ospald@googlemail.com> | 2013-05-09 00:39:22 +0200 |
commit | 95db16a15d14718bcc383d2a4762fc2cf7e8c514 (patch) | |
tree | 2bbc65f2dc23f5e4e317a9767d651eb23884cfee /elogv | |
parent | Fix accidental print statement in setup.py (diff) | |
download | elogv-95db16a15d14718bcc383d2a4762fc2cf7e8c514.tar.gz elogv-95db16a15d14718bcc383d2a4762fc2cf7e8c514.tar.bz2 elogv-95db16a15d14718bcc383d2a4762fc2cf7e8c514.zip |
Move from print statement to print function
This closes the door on Python 2.5 and earlier and opens the door to Python 3.x.
Diffstat (limited to 'elogv')
-rwxr-xr-x | elogv | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -15,6 +15,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +from __future__ import print_function + import os import sys import re @@ -307,8 +309,8 @@ class ElogViewer: try: self.openfile(pkg[PATH]) except IOError: - # print ("Logfile not found at '%s'. Did it get deleted somehow?" - # % os.path.join(elogdir,pkg[PATH])) + # print(("Logfile not found at '%s'. Did it get deleted somehow?" + # % os.path.join(elogdir,pkg[PATH]))) self.init_screen() self.change_usel(prev_usel, False) self.logf_wrap = self.wrap_logf_lines() @@ -573,7 +575,7 @@ class ElogViewer: if __name__ == "__main__": if "--help" in sys.argv: - print helptext + print(helptext) sys.exit() # Get the path of the elogdir @@ -586,14 +588,14 @@ if __name__ == "__main__": try: curses.wrapper(ElogViewer) except TermTooSmall: - print _("Your terminal window is too small, try to enlarge it") + print(_("Your terminal window is too small, try to enlarge it")) sys.exit(1) except NoLogFiles: - print _("There aren't any elog files on"),elogdir + print(_("There aren't any elog files on"), elogdir) sys.exit(1) except CannotOpenElogdir: - print _("Cannot open"),elogdir - print _("Please check if the directory exists and if it's readable by your user.") + print(_("Cannot open"), elogdir) + print(_("Please check if the directory exists and if it's readable by your user.")) sys.exit(1) except KeyboardInterrupt: pass |