summaryrefslogtreecommitdiff
path: root/Mac/Tools
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 18:39:28 +0000
committerCollin Winter <collinw@gmail.com>2007-08-30 18:39:28 +0000
commit5311039e207a04377c7bdff07e4476497dc3a435 (patch)
treedd53ab8fdeea4b1edce532c631e8ccc245f39e6d /Mac/Tools
parentc706908ce3714998535a83038b3317fd84b1f000 (diff)
downloadcpython-5311039e207a04377c7bdff07e4476497dc3a435.tar.gz
Run 2to3's print fixer over some places that had been missed.
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/Doc/setup.py10
-rw-r--r--Mac/Tools/fixapplepython23.py22
2 files changed, 16 insertions, 16 deletions
diff --git a/Mac/Tools/Doc/setup.py b/Mac/Tools/Doc/setup.py
index bd86a20a83..5f60c5184d 100644
--- a/Mac/Tools/Doc/setup.py
+++ b/Mac/Tools/Doc/setup.py
@@ -100,7 +100,7 @@ class DocBuild(build):
if os.path.isdir(origPath):
self.mkpath(outPath)
elif ext == '.html':
- if self.verbose: print 'hacking %s to %s' % (origPath,outPath)
+ if self.verbose: print('hacking %s to %s' % (origPath,outPath))
hackedFile = file(outPath, 'w')
origFile = file(origPath,'r')
hackedFile.write(self.r.sub('<dl><dt><dd>', origFile.read()))
@@ -118,7 +118,7 @@ class DocBuild(build):
def makeHelpIndex(self):
app = '/Developer/Applications/Apple Help Indexing Tool.app'
self.spawn('open', '-a', app , self.build_dest)
- print "Please wait until Apple Help Indexing Tool finishes before installing"
+ print("Please wait until Apple Help Indexing Tool finishes before installing")
def makeHelpIndex(self):
app = HelpIndexingTool.HelpIndexingTool(start=1)
@@ -180,18 +180,18 @@ class AHVDocInstall(Command):
self.build_dest = build_cmd.build_dest
if self.install_doc == None:
self.install_doc = os.path.join(self.prefix, DESTDIR)
- print 'INSTALL', self.build_dest, '->', self.install_doc
+ print('INSTALL', self.build_dest, '->', self.install_doc)
def run(self):
self.finalize_options()
self.ensure_finalized()
- print "Running Installer"
+ print("Running Installer")
instloc = self.install_doc
if self.root:
instloc = change_root(self.root, instloc)
self.mkpath(instloc)
copy_tree(self.build_dest, instloc)
- print "Installation complete"
+ print("Installation complete")
def mungeVersion(infile, outfile):
i = file(infile,'r')
diff --git a/Mac/Tools/fixapplepython23.py b/Mac/Tools/fixapplepython23.py
index 6ba54019f0..01a09b5896 100644
--- a/Mac/Tools/fixapplepython23.py
+++ b/Mac/Tools/fixapplepython23.py
@@ -57,23 +57,23 @@ def fix(makefile, do_apply):
continue
i = findline(lines, old)
if i < 0:
- print 'fixapplepython23: Python installation not fixed (appears broken)'
- print 'fixapplepython23: missing line:', old
+ print('fixapplepython23: Python installation not fixed (appears broken)')
+ print('fixapplepython23: missing line:', old)
return 2
lines[i] = new
fixed = True
if fixed:
if do_apply:
- print 'fixapplepython23: Fix to Apple-installed Python 2.3 applied'
+ print('fixapplepython23: Fix to Apple-installed Python 2.3 applied')
os.rename(makefile, makefile + '~')
open(makefile, 'w').writelines(lines)
return 0
else:
- print 'fixapplepython23: Fix to Apple-installed Python 2.3 should be applied'
+ print('fixapplepython23: Fix to Apple-installed Python 2.3 should be applied')
return 1
else:
- print 'fixapplepython23: No fix needed, appears to have been applied before'
+ print('fixapplepython23: No fix needed, appears to have been applied before')
return 0
def makescript(filename, compiler):
@@ -85,7 +85,7 @@ def makescript(filename, compiler):
fp.write(SCRIPT % compiler)
fp.close()
os.chmod(filename, 0755)
- print 'fixapplepython23: Created', filename
+ print('fixapplepython23: Created', filename)
def main():
# Check for -n option
@@ -96,24 +96,24 @@ def main():
# First check OS version
if sys.byteorder == 'little':
# All intel macs are fine
- print "fixapplypython23: no fix is needed on MacOSX on Intel"
+ print("fixapplypython23: no fix is needed on MacOSX on Intel")
sys.exit(0)
if gestalt.gestalt('sysv') < 0x1030:
- print 'fixapplepython23: no fix needed on MacOSX < 10.3'
+ print('fixapplepython23: no fix needed on MacOSX < 10.3')
sys.exit(0)
if gestalt.gestalt('sysv') >= 0x1040:
- print 'fixapplepython23: no fix needed on MacOSX >= 10.4'
+ print('fixapplepython23: no fix needed on MacOSX >= 10.4')
sys.exit(0)
# Test that a framework Python is indeed installed
if not os.path.exists(MAKEFILE):
- print 'fixapplepython23: Python framework does not appear to be installed (?), nothing fixed'
+ print('fixapplepython23: Python framework does not appear to be installed (?), nothing fixed')
sys.exit(0)
# Check that we can actually write the file
if do_apply and not os.access(MAKEFILE, os.W_OK):
- print 'fixapplepython23: No write permission, please run with "sudo"'
+ print('fixapplepython23: No write permission, please run with "sudo"')
sys.exit(2)
# Create the shell scripts
if do_apply: