mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-25 09:15:21 +03:00
All python file(...) converted to open(...)
This commit is contained in:
parent
2fac92a843
commit
f47692a258
4 changed files with 9 additions and 9 deletions
|
@ -66,7 +66,7 @@ def upload(binaries, ext, stamp):
|
||||||
ftp_connection.delete(ftp_directory + zip_name)
|
ftp_connection.delete(ftp_directory + zip_name)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
f = file(zip_name, 'rb')
|
f = open(zip_name, 'rb')
|
||||||
ftp_connection.storbinary('STOR ' + ftp_directory + zip_name, f)
|
ftp_connection.storbinary('STOR ' + ftp_directory + zip_name, f)
|
||||||
f.close()
|
f.close()
|
||||||
ftp_connection.quit()
|
ftp_connection.quit()
|
||||||
|
@ -190,7 +190,7 @@ def multithread_generate(hex, arg, extension, options, languages, maxsize):
|
||||||
|
|
||||||
|
|
||||||
def generate_c9x_list(filename, hexes, board):
|
def generate_c9x_list(filename, hexes, board):
|
||||||
f = file(filename, "w")
|
f = open(filename, "w")
|
||||||
f.write("const char *open9x_%s_binaries[] = {\n" % board)
|
f.write("const char *open9x_%s_binaries[] = {\n" % board)
|
||||||
for hex in hexes:
|
for hex in hexes:
|
||||||
f.write('"%s",\n' % hex)
|
f.write('"%s",\n' % hex)
|
||||||
|
|
|
@ -6,7 +6,7 @@ from PyQt4 import Qt, QtGui
|
||||||
image = QtGui.QImage(sys.argv[1])
|
image = QtGui.QImage(sys.argv[1])
|
||||||
width, height = image.size().width(), image.size().height()
|
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":
|
if sys.argv[3] == "img":
|
||||||
rows = 1
|
rows = 1
|
||||||
|
|
|
@ -4,11 +4,11 @@ import sys
|
||||||
|
|
||||||
filename = sys.argv[1]
|
filename = sys.argv[1]
|
||||||
print filename
|
print filename
|
||||||
fr = file(filename)
|
fr = open(filename)
|
||||||
fw = file(filename+".new", "w")
|
fw = open(filename+".new", "w")
|
||||||
ew = file(filename+".en", "w")
|
ew = open(filename+".en", "w")
|
||||||
hw = file(filename+".stringsh", "w")
|
hw = open(filename+".stringsh", "w")
|
||||||
cw = file(filename+".stringsc", "w")
|
cw = open(filename+".stringsc", "w")
|
||||||
|
|
||||||
replacements = {}
|
replacements = {}
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ if __name__ == "__main__":
|
||||||
voice += "-" + board
|
voice += "-" + board
|
||||||
|
|
||||||
if "csv" in sys.argv:
|
if "csv" in sys.argv:
|
||||||
csvFile = file(voice + ".csv", "w")
|
csvFile = open(voice + ".csv", "w")
|
||||||
for f, s in systemSounds:
|
for f, s in systemSounds:
|
||||||
l = u""
|
l = u""
|
||||||
if board == "arm":
|
if board == "arm":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue