Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ec53111f
Kaydet (Commit)
ec53111f
authored
Agu 04, 2013
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.3
üst
44473f26
95f34ab9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
EditorWindow.py
Lib/idlelib/EditorWindow.py
+2
-5
IOBinding.py
Lib/idlelib/IOBinding.py
+6
-9
ScriptBinding.py
Lib/idlelib/ScriptBinding.py
+2
-3
No files found.
Lib/idlelib/EditorWindow.py
Dosyayı görüntüle @
ec53111f
...
...
@@ -882,12 +882,9 @@ class EditorWindow(object):
"Load and update the recent files list and menus"
rf_list
=
[]
if
os
.
path
.
exists
(
self
.
recent_files_path
):
rf_list_file
=
open
(
self
.
recent_files_path
,
'r'
,
encoding
=
'utf_8'
,
errors
=
'replace'
)
try
:
with
open
(
self
.
recent_files_path
,
'r'
,
encoding
=
'utf_8'
,
errors
=
'replace'
)
as
rf_list_file
:
rf_list
=
rf_list_file
.
readlines
()
finally
:
rf_list_file
.
close
()
if
new_file
:
new_file
=
os
.
path
.
abspath
(
new_file
)
+
'
\n
'
if
new_file
in
rf_list
:
...
...
Lib/idlelib/IOBinding.py
Dosyayı görüntüle @
ec53111f
...
...
@@ -208,11 +208,10 @@ class IOBinding:
try
:
# open the file in binary mode so that we can handle
# end-of-line convention ourselves.
f
=
open
(
filename
,
'rb'
)
two_lines
=
f
.
readline
()
+
f
.
readline
()
f
.
seek
(
0
)
bytes
=
f
.
read
()
f
.
close
()
with
open
(
filename
,
'rb'
)
as
f
:
two_lines
=
f
.
readline
()
+
f
.
readline
()
f
.
seek
(
0
)
bytes
=
f
.
read
()
except
OSError
as
msg
:
tkMessageBox
.
showerror
(
"I/O Error"
,
str
(
msg
),
master
=
self
.
text
)
return
False
...
...
@@ -373,10 +372,8 @@ class IOBinding:
text
=
text
.
replace
(
"
\n
"
,
self
.
eol_convention
)
chars
=
self
.
encode
(
text
)
try
:
f
=
open
(
filename
,
"wb"
)
f
.
write
(
chars
)
f
.
flush
()
f
.
close
()
with
open
(
filename
,
"wb"
)
as
f
:
f
.
write
(
chars
)
return
True
except
OSError
as
msg
:
tkMessageBox
.
showerror
(
"I/O Error"
,
str
(
msg
),
...
...
Lib/idlelib/ScriptBinding.py
Dosyayı görüntüle @
ec53111f
...
...
@@ -87,9 +87,8 @@ class ScriptBinding:
self
.
shell
=
shell
=
self
.
flist
.
open_shell
()
saved_stream
=
shell
.
get_warning_stream
()
shell
.
set_warning_stream
(
shell
.
stderr
)
f
=
open
(
filename
,
'rb'
)
source
=
f
.
read
()
f
.
close
()
with
open
(
filename
,
'rb'
)
as
f
:
source
=
f
.
read
()
if
b
'
\r
'
in
source
:
source
=
source
.
replace
(
b
'
\r\n
'
,
b
'
\n
'
)
source
=
source
.
replace
(
b
'
\r
'
,
b
'
\n
'
)
...
...
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