diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index 17c196db31d..729f29bf8ce 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -178,7 +178,7 @@ def writefile(self, filename): self.fixlastline() try: f = open(filename, "w") - chars = self.text.get("1.0", "end-1c") + chars = str(self.text.get("1.0", "end-1c")) f.write(chars) f.close() ## print "saved to", `filename`