set executable option and some minor changes to ctodata/datatoc

This commit is contained in:
Campbell Barton
2012-04-13 07:49:59 +00:00
parent 05bdc46641
commit 1078ac78a2
2 changed files with 7 additions and 3 deletions

6
release/datafiles/ctodata.py Normal file → Executable file
View File

@@ -48,10 +48,14 @@ data = bytes([int(v) for v in data])
dname = filename + ".ctodata"
sys.stdout.write("Making DATA file <%s>\n" % dname)
try:
fpout = open(dname, "wb")
except:
sys.stdout.write("Unable to open output %s\n" % dname)
sys.exit(1)
fpout.write(data)
size = fpout.write(data)
sys.stdout.write("%d\n" % size)

View File

@@ -53,8 +53,8 @@ sys.stdout.write("Making C file <%s>\n" % cname)
filename = filename.split("/")[-1].split("\\")[-1]
filename = filename.replace(".", "_")
sys.stdout.write(str(size))
sys.stdout.write("\n")
sys.stdout.write("%d\n" % size)
try:
fpout = open(cname, "w")
except: