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
36269993
Kaydet (Commit)
36269993
authored
May 16, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some more changes from the net... Typos, 4.0/4.1 issues, new tkButtonInvoke().
üst
37dcab19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
10 deletions
+50
-10
Tkinter.py
Lib/lib-tk/Tkinter.py
+25
-5
Tkinter.py
Lib/tkinter/Tkinter.py
+25
-5
No files found.
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
36269993
...
...
@@ -24,10 +24,23 @@ from types import *
from
Tkconstants
import
*
import
string
;
_string
=
string
;
del
string
TkVersion
=
eval
(
tkinter
.
TK_VERSION
)
TclVersion
=
eval
(
tkinter
.
TCL_VERSION
)
TkVersion
=
_string
.
atof
(
tkinter
.
TK_VERSION
)
TclVersion
=
_string
.
atof
(
tkinter
.
TCL_VERSION
)
######################################################################
# Since the values of file event masks changed from Tk 4.0 to Tk 4.1,
# they are defined here (and not in Tkconstants):
######################################################################
if
TkVersion
>=
4.1
:
READABLE
=
2
WRITABLE
=
4
EXCEPTION
=
8
else
:
READABLE
=
1
WRITABLE
=
2
EXCEPTION
=
4
def
_flatten
(
tuple
):
res
=
()
for
item
in
tuple
:
...
...
@@ -249,7 +262,7 @@ class Misc:
def
winfo_class
(
self
):
return
self
.
tk
.
call
(
'winfo'
,
'class'
,
self
.
_w
)
def
winfo_containing
(
self
,
rootX
,
rootY
):
return
self
.
tk
.
call
(
'winfo'
,
'containing'
,
root
x
,
rootY
)
return
self
.
tk
.
call
(
'winfo'
,
'containing'
,
root
X
,
rootY
)
def
winfo_depth
(
self
):
return
self
.
tk
.
getint
(
self
.
tk
.
call
(
'winfo'
,
'depth'
,
self
.
_w
))
def
winfo_exists
(
self
):
...
...
@@ -451,7 +464,12 @@ class Misc:
except
TclError
:
pass
e
.
height
=
tk
.
getint
(
h
)
e
.
keycode
=
tk
.
getint
(
k
)
e
.
state
=
tk
.
getint
(
s
)
# For Visibility events, event state is a string and
# not an integer:
try
:
e
.
state
=
tk
.
getint
(
s
)
except
TclError
:
e
.
state
=
s
e
.
time
=
tk
.
getint
(
t
)
e
.
width
=
tk
.
getint
(
w
)
e
.
x
=
tk
.
getint
(
x
)
...
...
@@ -865,6 +883,8 @@ class Button(Widget):
self
.
tk
.
call
(
'tkButtonDown'
,
self
.
_w
)
def
tkButtonUp
(
self
,
*
dummy
):
self
.
tk
.
call
(
'tkButtonUp'
,
self
.
_w
)
def
tkButtonInvoke
(
self
,
*
dummy
):
self
.
tk
.
call
(
'tkButtonInvoke'
,
self
.
_w
)
def
flash
(
self
):
self
.
tk
.
call
(
self
.
_w
,
'flash'
)
def
invoke
(
self
):
...
...
Lib/tkinter/Tkinter.py
Dosyayı görüntüle @
36269993
...
...
@@ -24,10 +24,23 @@ from types import *
from
Tkconstants
import
*
import
string
;
_string
=
string
;
del
string
TkVersion
=
eval
(
tkinter
.
TK_VERSION
)
TclVersion
=
eval
(
tkinter
.
TCL_VERSION
)
TkVersion
=
_string
.
atof
(
tkinter
.
TK_VERSION
)
TclVersion
=
_string
.
atof
(
tkinter
.
TCL_VERSION
)
######################################################################
# Since the values of file event masks changed from Tk 4.0 to Tk 4.1,
# they are defined here (and not in Tkconstants):
######################################################################
if
TkVersion
>=
4.1
:
READABLE
=
2
WRITABLE
=
4
EXCEPTION
=
8
else
:
READABLE
=
1
WRITABLE
=
2
EXCEPTION
=
4
def
_flatten
(
tuple
):
res
=
()
for
item
in
tuple
:
...
...
@@ -249,7 +262,7 @@ class Misc:
def
winfo_class
(
self
):
return
self
.
tk
.
call
(
'winfo'
,
'class'
,
self
.
_w
)
def
winfo_containing
(
self
,
rootX
,
rootY
):
return
self
.
tk
.
call
(
'winfo'
,
'containing'
,
root
x
,
rootY
)
return
self
.
tk
.
call
(
'winfo'
,
'containing'
,
root
X
,
rootY
)
def
winfo_depth
(
self
):
return
self
.
tk
.
getint
(
self
.
tk
.
call
(
'winfo'
,
'depth'
,
self
.
_w
))
def
winfo_exists
(
self
):
...
...
@@ -451,7 +464,12 @@ class Misc:
except
TclError
:
pass
e
.
height
=
tk
.
getint
(
h
)
e
.
keycode
=
tk
.
getint
(
k
)
e
.
state
=
tk
.
getint
(
s
)
# For Visibility events, event state is a string and
# not an integer:
try
:
e
.
state
=
tk
.
getint
(
s
)
except
TclError
:
e
.
state
=
s
e
.
time
=
tk
.
getint
(
t
)
e
.
width
=
tk
.
getint
(
w
)
e
.
x
=
tk
.
getint
(
x
)
...
...
@@ -865,6 +883,8 @@ class Button(Widget):
self
.
tk
.
call
(
'tkButtonDown'
,
self
.
_w
)
def
tkButtonUp
(
self
,
*
dummy
):
self
.
tk
.
call
(
'tkButtonUp'
,
self
.
_w
)
def
tkButtonInvoke
(
self
,
*
dummy
):
self
.
tk
.
call
(
'tkButtonInvoke'
,
self
.
_w
)
def
flash
(
self
):
self
.
tk
.
call
(
self
.
_w
,
'flash'
)
def
invoke
(
self
):
...
...
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