diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-05-23 23:21:26 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-05-23 23:21:26 (GMT) |
commit | aa5a0468340338cc3423a06d6d55e1b52a713bc5 (patch) | |
tree | 71ff4e88b1e418ff32ba89ae0f4cf0b3f0d180a1 /bin/install_python.py | |
parent | 15bd909b178ba5271125fca6846fa8c069be79f1 (diff) | |
parent | b387e34357c968d0855c525c7e838657a957ff01 (diff) | |
download | SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.zip SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.tar.gz SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.tar.bz2 |
merge python3 branch to default
Diffstat (limited to 'bin/install_python.py')
-rw-r--r-- | bin/install_python.py | 7 |
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 |