Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fca0aaa1
Commit
fca0aaa1
authored
Aug 13, 2007
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable basic load/store again.
parent
2cf3fa3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/idlelib/IOBinding.py
Lib/idlelib/IOBinding.py
+3
-3
No files found.
Lib/idlelib/IOBinding.py
View file @
fca0aaa1
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment