summaryrefslogtreecommitdiff
path: root/bin/install_python.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/install_python.py')
-rw-r--r--bin/install_python.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/install_python.py b/bin/install_python.py
index 86807af..5c947ac 100644
--- a/bin/install_python.py
+++ b/bin/install_python.py
@@ -6,6 +6,7 @@
# This was written for a Linux system (specifically Ubuntu) but should
# be reasonably generic to any POSIX-style system with a /usr/local
# hierarchy.
+from __future__ import print_function
import getopt
import os
@@ -48,7 +49,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
try:
try:
opts, args = getopt.getopt(argv[1:], short_options, long_options)
- except getopt.error, msg:
+ except getopt.error as msg:
raise Usage(msg)
for o, a in opts:
@@ -57,7 +58,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
elif o in ('-d', '--downloads'):
downloads_dir = a
elif o in ('-h', '--help'):
- print helpstr
+ print(helpstr)
sys.exit(0)
elif o in ('-n', '--no-exec'):
CommandRunner.execute = CommandRunner.do_not_execute
@@ -65,7 +66,7 @@ Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
prefix = a
elif o in ('-q', '--quiet'):
CommandRunner.display = CommandRunner.do_not_display
- except Usage, err:
+ except Usage as err:
sys.stderr.write(str(err.msg) + '\n')
sys.stderr.write('use -h to get help\n')
return 2