From de89c2e178538aa35a239f1af3323bc2acef7860 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Sat, 12 Mar 2016 12:56:23 +0200 Subject: [PATCH] python: Material: *.py: Fix syntax for Python 3 --- src/Mod/Material/Material.py | 4 ++-- src/Mod/Material/importFCMat.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Material/Material.py b/src/Mod/Material/Material.py index 3cf29b5e7..fa67c1882 100644 --- a/src/Mod/Material/Material.py +++ b/src/Mod/Material/Material.py @@ -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 diff --git a/src/Mod/Material/importFCMat.py b/src/Mod/Material/importFCMat.py index ab6f9cc78..4d41dac67 100644 --- a/src/Mod/Material/importFCMat.py +++ b/src/Mod/Material/importFCMat.py @@ -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")