From f47692a258a31a852bdc83dbcd422bebd3e0929d Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 27 Aug 2012 20:26:21 +0000 Subject: [PATCH] All python file(...) converted to open(...) --- util/compile.py | 4 ++-- util/img2lbm.py | 2 +- util/parse.py | 10 +++++----- util/tts.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/util/compile.py b/util/compile.py index 6cec85b24..c41dcfd82 100644 --- a/util/compile.py +++ b/util/compile.py @@ -66,7 +66,7 @@ def upload(binaries, ext, stamp): ftp_connection.delete(ftp_directory + zip_name) except: pass - f = file(zip_name, 'rb') + f = open(zip_name, 'rb') ftp_connection.storbinary('STOR ' + ftp_directory + zip_name, f) f.close() ftp_connection.quit() @@ -190,7 +190,7 @@ def multithread_generate(hex, arg, extension, options, languages, maxsize): def generate_c9x_list(filename, hexes, board): - f = file(filename, "w") + f = open(filename, "w") f.write("const char *open9x_%s_binaries[] = {\n" % board) for hex in hexes: f.write('"%s",\n' % hex) diff --git a/util/img2lbm.py b/util/img2lbm.py index 47392157a..d5279253b 100644 --- a/util/img2lbm.py +++ b/util/img2lbm.py @@ -6,7 +6,7 @@ from PyQt4 import Qt, QtGui image = QtGui.QImage(sys.argv[1]) width, height = image.size().width(), image.size().height() -f = file(sys.argv[2], "w") +f = open(sys.argv[2], "w") if sys.argv[3] == "img": rows = 1 diff --git a/util/parse.py b/util/parse.py index 243c77bc8..5d0faac96 100644 --- a/util/parse.py +++ b/util/parse.py @@ -4,11 +4,11 @@ import sys filename = sys.argv[1] print filename -fr = file(filename) -fw = file(filename+".new", "w") -ew = file(filename+".en", "w") -hw = file(filename+".stringsh", "w") -cw = file(filename+".stringsc", "w") +fr = open(filename) +fw = open(filename+".new", "w") +ew = open(filename+".en", "w") +hw = open(filename+".stringsh", "w") +cw = open(filename+".stringsc", "w") replacements = {} diff --git a/util/tts.py b/util/tts.py index a1895a685..e083ff448 100644 --- a/util/tts.py +++ b/util/tts.py @@ -370,7 +370,7 @@ if __name__ == "__main__": voice += "-" + board if "csv" in sys.argv: - csvFile = file(voice + ".csv", "w") + csvFile = open(voice + ".csv", "w") for f, s in systemSounds: l = u"" if board == "arm":