diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-08-30 15:23:04 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-08-30 15:23:04 (GMT) |
commit | 4c6c7caf83479e7a5675823dc1a00988772a7533 (patch) | |
tree | 96ce112be142705789928028628915232a293ceb /Tools/msi/msilib.py | |
parent | 945362cf971fb2e10f8f2a8e71e8ff10516ebe4c (diff) | |
download | cpython-4c6c7caf83479e7a5675823dc1a00988772a7533.zip cpython-4c6c7caf83479e7a5675823dc1a00988772a7533.tar.gz cpython-4c6c7caf83479e7a5675823dc1a00988772a7533.tar.bz2 |
Port to Python 3.0.
Diffstat (limited to 'Tools/msi/msilib.py')
-rw-r--r-- | Tools/msi/msilib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py index 9823e2a..8a232bf 100644 --- a/Tools/msi/msilib.py +++ b/Tools/msi/msilib.py @@ -202,7 +202,7 @@ def gen_sequence(destpath, msipath): v = seqmsi.OpenView("SELECT * FROM _Tables"); v.Execute(None) f = open(destpath, "w") - print("import msilib,os;dirname=os.path.dirname(__file__)", file=f) + f.write("import msilib,os;dirname=os.path.dirname(__file__)\n") 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('"%s" %s' % (full, logical), file=self.file) + self.file.write('"%s" %s\n' % (full, logical)) else: - print('%s %s' % (full, logical), file=self.file) + self.file.write('%s %s\n' % (full, logical)) return self.index, logical def commit(self, db): @@ -390,8 +390,8 @@ class CAB: 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, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT)[0] - for line in (p.stdout, p.stdin): + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + for line in p.stdout: if line.startswith(" -- adding "): sys.stdout.write(".") else: |