python: Material: *.py: Fix syntax for Python 3

This commit is contained in:
Priit Laes 2016-03-12 12:56:23 +02:00 committed by wmayer
parent 34a3039577
commit de89c2e178
2 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ if __name__ == '__main__':
# checking on the options
for o, a in opts:
if o in ("-c", "--output-csv"):
print "writing file: " + a + "\n"
print("writing file: " + a + "\n")
OutPath = a
# runing through the files
@ -109,5 +109,5 @@ if __name__ == '__main__':
kv_map = importFCMat(FileName)
for k in kv_map.keys():
print repr(k) + " : " + repr(kv_map[k])
print(repr(k) + " : " + repr(kv_map[k]))
sys.exit(0) # no error

View File

@ -126,7 +126,7 @@ def write(filename,dictionary):
if isinstance(filename,unicode):
import sys
filename = filename.encode(sys.getfilesystemencoding())
print filename
print(filename)
f = pythonopen(filename,"wb")
f.write("; " + header["CardName"].encode("utf8") + "\n")
f.write("; " + header["AuthorAndLicense"].encode("utf8") + "\n")