summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-08-13 13:30:04 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-08-13 13:30:04 (GMT)
commit4d9ed9fc33dba2a452548d2c5369ba92f56c0d79 (patch)
treeb67e7fc8d2e0cfaa90907d369111758b01158263 /Lib/idlelib
parentcaf871ad322bde58da34494cbef18007e298cf00 (diff)
downloadcpython-4d9ed9fc33dba2a452548d2c5369ba92f56c0d79.zip
cpython-4d9ed9fc33dba2a452548d2c5369ba92f56c0d79.tar.gz
cpython-4d9ed9fc33dba2a452548d2c5369ba92f56c0d79.tar.bz2
Enable basic load/store again.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/IOBinding.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index d749788..e2f75aa 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -123,6 +123,8 @@ def coding_spec(str):
Raise LookupError if the encoding is declared but unknown.
"""
+ # perform string manipulation in latin-1
+ str = str.decode("latin-1")
# Only consider the first two lines
str = str.split("\n")[:2]
str = "\n".join(str)
@@ -386,7 +388,7 @@ class IOBinding:
return False
def encode(self, chars):
- if isinstance(chars, types.StringType):
+ if isinstance(chars, bytes):
# This is either plain ASCII, or Tk was returning mixed-encoding
# text to us. Don't try to guess further.
return chars
@@ -544,8 +546,6 @@ class IOBinding:
self.savedialog = tkFileDialog.SaveAs(master=self.text,
filetypes=self.filetypes)
filename = self.savedialog.show(initialdir=dir, initialfile=base)
- if isinstance(filename, str):
- filename = filename.encode(filesystemencoding)
return filename
def updaterecentfileslist(self,filename):