summaryrefslogtreecommitdiffstats
path: root/Tools/msi
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
commit6afaeb757af0dbd8508a0f2352ade61e41bec84c (patch)
treef1b31bc7138b17ff39791bbb45aa81583c3b6e46 /Tools/msi
parente5d0e8431f929cad2da77b63fe1b7dc0ff21a428 (diff)
downloadcpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.zip
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.gz
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.bz2
Convert print statements to function calls in Tools/.
Diffstat (limited to 'Tools/msi')
-rw-r--r--Tools/msi/msi.py22
-rw-r--r--Tools/msi/msilib.py12
2 files changed, 17 insertions, 17 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
index c49bb84..93c6ba7 100644
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -114,7 +114,7 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
dlltool = find_executable('dlltool')
if not nm or not dlltool:
- print warning % "nm and/or dlltool were not found"
+ print(warning % "nm and/or dlltool were not found")
return False
nm_command = '%s -Cs %s' % (nm, lib_file)
@@ -123,23 +123,23 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
export_match = re.compile(r"^_imp__(.*) in python\d+\.dll").match
f = open(def_file,'w')
- print >>f, "LIBRARY %s" % dll_file
- print >>f, "EXPORTS"
+ print("LIBRARY %s" % dll_file, file=f)
+ print("EXPORTS", file=f)
nm_pipe = os.popen(nm_command)
for line in nm_pipe.readlines():
m = export_match(line)
if m:
- print >>f, m.group(1)
+ print(m.group(1), file=f)
f.close()
exit = nm_pipe.close()
if exit:
- print warning % "nm did not run successfully"
+ print(warning % "nm did not run successfully")
return False
if os.system(dlltool_command) != 0:
- print warning % "dlltool did not run successfully"
+ print(warning % "dlltool did not run successfully")
return False
return True
@@ -875,7 +875,7 @@ def add_files(db):
# Check if _ctypes.pyd exists
have_ctypes = os.path.exists(srcdir+"/PCBuild/_ctypes.pyd")
if not have_ctypes:
- print "WARNING: _ctypes.pyd not found, ctypes will not be included"
+ print("WARNING: _ctypes.pyd not found, ctypes will not be included")
extensions.remove("_ctypes.pyd")
# Add all .py files in Lib, except lib-tk, test
@@ -953,7 +953,7 @@ def add_files(db):
if f.endswith(".au") or f.endswith(".gif"):
lib.add_file(f)
else:
- print "WARNING: New file %s in email/test/data" % f
+ print("WARNING: New file %s in email/test/data" % f)
for f in os.listdir(lib.absolute):
if os.path.isdir(os.path.join(lib.absolute, f)):
pydirs.append((lib, f))
@@ -968,7 +968,7 @@ def add_files(db):
if f=="_tkinter.pyd":
continue
if not os.path.exists(srcdir+"/PCBuild/"+f):
- print "WARNING: Missing extension", f
+ print("WARNING: Missing extension", f)
continue
dlls.append(f)
lib.add_file(f)
@@ -982,7 +982,7 @@ def add_files(db):
lib.add_file(srcdir+"/"+sqlite_dir+sqlite_arch+"/sqlite3.dll")
if have_tcl:
if not os.path.exists(srcdir+"/PCBuild/_tkinter.pyd"):
- print "WARNING: Missing _tkinter.pyd"
+ print("WARNING: Missing _tkinter.pyd")
else:
lib.start_component("TkDLLs", tcltk)
lib.add_file("_tkinter.pyd")
@@ -994,7 +994,7 @@ def add_files(db):
for f in glob.glob1(srcdir+"/PCBuild", "*.pyd"):
if f.endswith("_d.pyd"): continue # debug version
if f in dlls: continue
- print "WARNING: Unknown extension", f
+ print("WARNING: Unknown extension", f)
# Add headers
default_feature.set_current()
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py
index 548b640..8aea216 100644
--- a/Tools/msi/msilib.py
+++ b/Tools/msi/msilib.py
@@ -95,7 +95,7 @@ class Table:
index -= 1
unk = type & ~knownbits
if unk:
- print "%s.%s unknown bits %x" % (self.name, name, unk)
+ print("%s.%s unknown bits %x" % (self.name, name, unk))
size = type & datasizemask
dtype = type & typemask
if dtype == type_string:
@@ -114,7 +114,7 @@ class Table:
tname="OBJECT"
else:
tname="unknown"
- print "%s.%sunknown integer type %d" % (self.name, name, size)
+ print("%s.%sunknown integer type %d" % (self.name, name, size))
if type & type_nullable:
flags = ""
else:
@@ -202,7 +202,7 @@ def gen_sequence(destpath, msipath):
v = seqmsi.OpenView("SELECT * FROM _Tables");
v.Execute(None)
f = open(destpath, "w")
- print >>f, "import msilib,os;dirname=os.path.dirname(__file__)"
+ print("import msilib,os;dirname=os.path.dirname(__file__)", file=f)
tables = []
while 1:
r = v.Fetch()
@@ -364,9 +364,9 @@ class CAB:
logical = self.gen_id(dir, file)
self.index += 1
if full.find(" ")!=-1:
- print >>self.file, '"%s" %s' % (full, logical)
+ print('"%s" %s' % (full, logical), file=self.file)
else:
- print >>self.file, '%s %s' % (full, logical)
+ print('%s %s' % (full, logical), file=self.file)
return self.index, logical
def commit(self, db):
@@ -386,7 +386,7 @@ class CAB:
if not os.path.exists(cabarc):continue
break
else:
- print "WARNING: cabarc.exe not found in registry"
+ print("WARNING: cabarc.exe not found in registry")
cabarc = "cabarc.exe"
cmd = r'"%s" -m lzx:21 n %s.cab @%s.txt' % (cabarc, self.name, self.name)
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,