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
a944ac3c
Kaydet (Commit)
a944ac3c
authored
Ock 27, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25507: revert incorrect movement of idleConf import in a37ea1d56e98.
Augment htest to include all major IOBinding functions.
üst
b031adcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
IOBinding.py
Lib/idlelib/IOBinding.py
+12
-3
htest.py
Lib/idlelib/idle_test/htest.py
+3
-0
No files found.
Lib/idlelib/IOBinding.py
Dosyayı görüntüle @
a944ac3c
...
...
@@ -17,6 +17,8 @@ import tkFileDialog
import
tkMessageBox
from
SimpleDialog
import
SimpleDialog
from
idlelib.configHandler
import
idleConf
# Try setting the locale, so that we can find out
# what encoding to use
try
:
...
...
@@ -137,7 +139,6 @@ def coding_spec(str):
raise
LookupError
,
"Unknown encoding "
+
name
return
name
class
IOBinding
:
def
__init__
(
self
,
editwin
):
...
...
@@ -567,7 +568,6 @@ class IOBinding:
def
_io_binding
(
parent
):
# htest #
from
Tkinter
import
Toplevel
,
Text
from
idlelib.configHandler
import
idleConf
root
=
Toplevel
(
parent
)
root
.
title
(
"Test IOBinding"
)
...
...
@@ -578,15 +578,24 @@ def _io_binding(parent): # htest #
self
.
text
=
text
self
.
flist
=
None
self
.
text
.
bind
(
"<Control-o>"
,
self
.
open
)
self
.
text
.
bind
(
'<Control-p>'
,
self
.
printer
)
self
.
text
.
bind
(
"<Control-s>"
,
self
.
save
)
self
.
text
.
bind
(
"<Alt-s>"
,
self
.
saveas
)
self
.
text
.
bind
(
'<Control-c>'
,
self
.
savecopy
)
def
get_saved
(
self
):
return
0
def
set_saved
(
self
,
flag
):
pass
def
reset_undo
(
self
):
pass
def
update_recent_files_list
(
self
,
filename
):
pass
def
open
(
self
,
event
):
self
.
text
.
event_generate
(
"<<open-window-from-file>>"
)
def
printer
(
self
,
event
):
self
.
text
.
event_generate
(
"<<print-window>>"
)
def
save
(
self
,
event
):
self
.
text
.
event_generate
(
"<<save-window>>"
)
def
update_recent_files_list
(
s
,
f
):
pass
def
saveas
(
self
,
event
):
self
.
text
.
event_generate
(
"<<save-window-as-file>>"
)
def
savecopy
(
self
,
event
):
self
.
text
.
event_generate
(
"<<save-copy-of-window-as-file>>"
)
text
=
Text
(
root
)
text
.
pack
()
...
...
Lib/idlelib/idle_test/htest.py
Dosyayı görüntüle @
a944ac3c
...
...
@@ -192,7 +192,10 @@ _io_binding_spec = {
'msg'
:
"Test the following bindings.
\n
"
"<Control-o> to open file from dialog.
\n
"
"Edit the file.
\n
"
"<Control-p> to print the file.
\n
"
"<Control-s> to save the file.
\n
"
"<Alt-s> to save-as another file.
\n
"
"<Control-c> to save-copy-as another file.
\n
"
"Check that changes were saved by opening the file elsewhere."
}
...
...
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