diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 18:39:28 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 18:39:28 (GMT) |
commit | e7bf59f500481715e76ff646f6728e28361faff2 (patch) | |
tree | 3f3dcd530272bb5be36089c3f2f3345ee373012f /Mac/scripts | |
parent | 716c3ac40cae880193dfdbda39a0ca7ed7cd2854 (diff) | |
download | cpython-e7bf59f500481715e76ff646f6728e28361faff2.zip cpython-e7bf59f500481715e76ff646f6728e28361faff2.tar.gz cpython-e7bf59f500481715e76ff646f6728e28361faff2.tar.bz2 |
Run 2to3's print fixer over some places that had been missed.
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/BuildApplet.py | 24 | ||||
-rw-r--r-- | Mac/scripts/bgenall.py | 10 | ||||
-rw-r--r-- | Mac/scripts/buildpkg.py | 28 | ||||
-rw-r--r-- | Mac/scripts/mkestrres.py | 14 | ||||
-rw-r--r-- | Mac/scripts/zappycfiles.py | 4 |
5 files changed, 40 insertions, 40 deletions
diff --git a/Mac/scripts/BuildApplet.py b/Mac/scripts/BuildApplet.py index 9ddcd0b..e1f9ea1 100644 --- a/Mac/scripts/BuildApplet.py +++ b/Mac/scripts/BuildApplet.py @@ -116,18 +116,18 @@ def buildapplet(): progress=verbose, destroot=destroot) def usage(): - print "BuildApplet creates an application from a Python source file" - print "Usage:" - print " BuildApplet interactive, single file, no options" - print " BuildApplet src1.py src2.py ... non-interactive multiple file" - print " BuildApplet [options] src.py non-interactive single file" - print "Options:" - print " --output o Output file; default based on source filename, short -o" - print " --resource r Resource file; default based on source filename, short -r" - print " --noargv Build applet without drag-and-drop sys.argv emulation, short -n, OSX only" - print " --extra src[:dst] Extra file to put in .app bundle, short -e, OSX only" - print " --verbose Verbose, short -v" - print " --help This message, short -?" + print("BuildApplet creates an application from a Python source file") + print("Usage:") + print(" BuildApplet interactive, single file, no options") + print(" BuildApplet src1.py src2.py ... non-interactive multiple file") + print(" BuildApplet [options] src.py non-interactive single file") + print("Options:") + print(" --output o Output file; default based on source filename, short -o") + print(" --resource r Resource file; default based on source filename, short -r") + print(" --noargv Build applet without drag-and-drop sys.argv emulation, short -n, OSX only") + print(" --extra src[:dst] Extra file to put in .app bundle, short -e, OSX only") + print(" --verbose Verbose, short -v") + print(" --help This message, short -?") sys.exit(1) class Verbose: diff --git a/Mac/scripts/bgenall.py b/Mac/scripts/bgenall.py index 1fe5f34..dc33163 100644 --- a/Mac/scripts/bgenall.py +++ b/Mac/scripts/bgenall.py @@ -6,7 +6,7 @@ import string def bgenone(dirname, shortname): os.chdir(dirname) - print '%s:'%shortname + print('%s:'%shortname) # Sigh, we don't want to lose CVS history, so two # modules have funny names: if shortname == 'carbonevt': @@ -18,12 +18,12 @@ def bgenone(dirname, shortname): try: m = __import__(modulename) except: - print "Error:", shortname, sys.exc_info()[1] + print("Error:", shortname, sys.exc_info()[1]) return 0 try: m.main() except: - print "Error:", shortname, sys.exc_info()[1] + print("Error:", shortname, sys.exc_info()[1]) return 0 return 1 @@ -45,9 +45,9 @@ def main(): success.append(name) else: failure.append(name) - print 'Done:', string.join(success, ' ') + print('Done:', string.join(success, ' ')) if failure: - print 'Failed:', string.join(failure, ' ') + print('Failed:', string.join(failure, ' ')) return 0 return 1 diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py index e50c405..73dd4b6 100644 --- a/Mac/scripts/buildpkg.py +++ b/Mac/scripts/buildpkg.py @@ -417,18 +417,18 @@ def printUsage(): "Print usage message." format = "Usage: %s <opts1> [<opts2>] <root> [<resources>]" - print format % basename(sys.argv[0]) - print - print " with arguments:" - print " (mandatory) root: the package root folder" - print " (optional) resources: the package resources folder" - print - print " and options:" - print " (mandatory) opts1:" + print(format % basename(sys.argv[0])) + print() + print(" with arguments:") + print(" (mandatory) root: the package root folder") + print(" (optional) resources: the package resources folder") + print() + print(" and options:") + print(" (mandatory) opts1:") mandatoryKeys = string.split("Title Version Description", " ") for k in mandatoryKeys: - print " --%s" % k - print " (optional) opts2: (with default values)" + print(" --%s" % k) + print(" (optional) opts2: (with default values)") pmDefaults = PackageMaker.packageInfoDefaults optionalKeys = pmDefaults.keys() @@ -439,7 +439,7 @@ def printUsage(): for k in optionalKeys: format = " --%%s:%s %%s" format = format % (" " * (maxKeyLen-len(k))) - print format % (k, repr(pmDefaults[k])) + print(format % (k, repr(pmDefaults[k]))) def main(): @@ -452,7 +452,7 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], shortOpts, longOpts) except getopt.GetoptError as details: - print details + print(details) printUsage() return @@ -462,11 +462,11 @@ def main(): ok = optsDict.keys() if not (1 <= len(args) <= 2): - print "No argument given!" + print("No argument given!") elif not ("Title" in ok and \ "Version" in ok and \ "Description" in ok): - print "Missing mandatory option!" + print("Missing mandatory option!") else: buildPackage(*args, **optsDict) return diff --git a/Mac/scripts/mkestrres.py b/Mac/scripts/mkestrres.py index 715b8c6..d423892 100644 --- a/Mac/scripts/mkestrres.py +++ b/Mac/scripts/mkestrres.py @@ -68,9 +68,9 @@ def parse_errno_h(fp, dict): if not dict.has_key(number): dict[number] = desc, name else: - print 'DUPLICATE', number - print '\t', dict[number] - print '\t', (desc, name) + print('DUPLICATE', number) + print('\t', dict[number]) + print('\t', (desc, name)) def parse_errors_h(fp, dict): errno_prog = re.compile(ERRORS_PROG) @@ -95,11 +95,11 @@ def parse_errors_h(fp, dict): if not dict.has_key(number): dict[number] = desc, name else: - print 'DUPLICATE', number - print '\t', dict[number] - print '\t', (desc, name) + print('DUPLICATE', number) + print('\t', dict[number]) + print('\t', (desc, name)) if len(desc) > len(dict[number][0]): - print 'Pick second one' + print('Pick second one') dict[number] = desc, name def main(): diff --git a/Mac/scripts/zappycfiles.py b/Mac/scripts/zappycfiles.py index a8193c1..77258da 100644 --- a/Mac/scripts/zappycfiles.py +++ b/Mac/scripts/zappycfiles.py @@ -16,7 +16,7 @@ def main(): sys.exit(0) zappyc(dir) else: - print 'Usage: zappyc dir ...' + print('Usage: zappyc dir ...') sys.exit(1) for dir in sys.argv[1:]: zappyc(dir) @@ -28,7 +28,7 @@ def walker(dummy, top, names): for name in names: if name[-4:] in ('.pyc', '.pyo'): path = os.path.join(top, name) - print 'Zapping', path + print('Zapping', path) if doit: os.unlink(path) |