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
361baadd
Kaydet (Commit)
361baadd
authored
Haz 03, 2012
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.2 #10365
üst
07ea53cb
a948c79a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
IOBinding.py
Lib/idlelib/IOBinding.py
+13
-16
No files found.
Lib/idlelib/IOBinding.py
Dosyayı görüntüle @
361baadd
...
@@ -157,35 +157,32 @@ class IOBinding:
...
@@ -157,35 +157,32 @@ class IOBinding:
def
open
(
self
,
event
=
None
,
editFile
=
None
):
def
open
(
self
,
event
=
None
,
editFile
=
None
):
flist
=
self
.
editwin
.
flist
flist
=
self
.
editwin
.
flist
# Save in case parent window is closed (ie, during askopenfile()).
if
flist
:
if
flist
:
if
not
editFile
:
if
not
editFile
:
filename
=
self
.
askopenfile
()
filename
=
self
.
askopenfile
()
else
:
else
:
filename
=
editFile
filename
=
editFile
if
filename
:
if
filename
:
# If the current window has no filename and hasn't been
# If editFile is valid and already open, flist.open will
# modified, we replace its contents (no loss). Otherwise
# shift focus to its existing window.
# we open a new window. But we won't replace the
# If the current window exists and is a fresh unnamed,
# shell window (which has an interp(reter) attribute), which
# unmodified editor window (not an interpreter shell),
# gets set to "not modified" at every new prompt.
# pass self.loadfile to flist.open so it will load the file
# Also, make sure the current window has not been closed,
# in the current window (if the file is not already open)
# since it can be closed during the Open File dialog.
# instead of a new window.
try
:
if
(
self
.
editwin
and
interp
=
self
.
editwin
.
interp
not
getattr
(
self
.
editwin
,
'interp'
,
None
)
and
except
AttributeError
:
not
self
.
filename
and
interp
=
None
self
.
get_saved
()):
if
self
.
editwin
and
not
self
.
filename
and
\
self
.
get_saved
()
and
not
interp
:
flist
.
open
(
filename
,
self
.
loadfile
)
flist
.
open
(
filename
,
self
.
loadfile
)
else
:
else
:
flist
.
open
(
filename
)
flist
.
open
(
filename
)
else
:
else
:
if
self
.
text
:
if
self
.
text
:
self
.
text
.
focus_set
()
self
.
text
.
focus_set
()
return
"break"
return
"break"
#
# Code for use outside IDLE:
# Code for use outside IDLE:
if
self
.
get_saved
():
if
self
.
get_saved
():
reply
=
self
.
maybesave
()
reply
=
self
.
maybesave
()
...
...
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