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
7e9394ab
Kaydet (Commit)
7e9394ab
authored
Mar 17, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add TkVersion,TclVersion; don't drop in debugger
üst
470be14c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
84 deletions
+40
-84
Tkinter.py
Lib/lib-tk/Tkinter.py
+20
-42
Tkinter.py
Lib/tkinter/Tkinter.py
+20
-42
No files found.
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
7e9394ab
...
...
@@ -2,22 +2,20 @@
import
tkinter
from
tkinter
import
TclError
from
types
import
*
CallableTypes
=
(
FunctionType
,
MethodType
,
BuiltinFunctionType
,
BuiltinMethodType
,
ClassType
,
InstanceType
)
class
_Dummy
:
def
meth
(
self
):
return
def
_func
():
pass
FunctionType
=
type
(
_func
)
ClassType
=
type
(
_Dummy
)
MethodType
=
type
(
_Dummy
.
meth
)
StringType
=
type
(
''
)
TupleType
=
type
(())
ListType
=
type
([])
DictionaryType
=
type
({})
NoneType
=
type
(
None
)
CallableTypes
=
(
FunctionType
,
MethodType
)
# Older versions of tkinter don't define these variables
try
:
TkVersion
=
eval
(
tkinter
.
TK_VERSION
)
except
AttributeError
:
TkVersion
=
3.6
try
:
TclVersion
=
eval
(
tkinter
.
TCL_VERSION
)
except
AttributeError
:
TclVersion
=
7.3
def
_flatten
(
tuple
):
res
=
()
...
...
@@ -347,10 +345,10 @@ class Misc:
self
.
tk
.
quit
()
def
_getints
(
self
,
string
):
if
not
string
:
return
None
re
s
=
(
)
for
v
in
self
.
tk
.
splitlist
(
string
):
res
=
res
+
(
self
.
tk
.
getint
(
v
),)
return
res
re
turn
tuple
(
map
(
self
.
tk
.
getint
,
self
.
tk
.
splitlist
(
string
))
)
def
_getdoubles
(
self
,
string
):
if
not
string
:
return
None
return
tuple
(
map
(
self
.
tk
.
getdouble
,
self
.
tk
.
splitlist
(
string
)))
def
_getboolean
(
self
,
string
):
if
string
:
return
self
.
tk
.
getboolean
(
string
)
...
...
@@ -438,29 +436,9 @@ class _CallSafely:
except
SystemExit
,
msg
:
raise
SystemExit
,
msg
except
:
try
:
try
:
t
=
sys
.
exc_traceback
while
t
:
sys
.
stderr
.
write
(
'
%
s, line
%
s
\n
'
%
(
t
.
tb_frame
.
f_code
,
t
.
tb_lineno
))
t
=
t
.
tb_next
finally
:
sys
.
stderr
.
write
(
'
%
s:
%
s
\n
'
%
(
sys
.
exc_type
,
sys
.
exc_value
))
(
sys
.
last_type
,
sys
.
last_value
,
sys
.
last_traceback
)
=
(
sys
.
exc_type
,
sys
.
exc_value
,
sys
.
exc_traceback
)
import
pdb
pdb
.
pm
()
except
:
print
'*** Error in error handling ***'
print
sys
.
exc_type
,
':'
,
sys
.
exc_value
import
traceback
print
"Exception in Tkinter callback"
traceback
.
print_exc
()
class
Wm
:
def
aspect
(
self
,
...
...
Lib/tkinter/Tkinter.py
Dosyayı görüntüle @
7e9394ab
...
...
@@ -2,22 +2,20 @@
import
tkinter
from
tkinter
import
TclError
from
types
import
*
CallableTypes
=
(
FunctionType
,
MethodType
,
BuiltinFunctionType
,
BuiltinMethodType
,
ClassType
,
InstanceType
)
class
_Dummy
:
def
meth
(
self
):
return
def
_func
():
pass
FunctionType
=
type
(
_func
)
ClassType
=
type
(
_Dummy
)
MethodType
=
type
(
_Dummy
.
meth
)
StringType
=
type
(
''
)
TupleType
=
type
(())
ListType
=
type
([])
DictionaryType
=
type
({})
NoneType
=
type
(
None
)
CallableTypes
=
(
FunctionType
,
MethodType
)
# Older versions of tkinter don't define these variables
try
:
TkVersion
=
eval
(
tkinter
.
TK_VERSION
)
except
AttributeError
:
TkVersion
=
3.6
try
:
TclVersion
=
eval
(
tkinter
.
TCL_VERSION
)
except
AttributeError
:
TclVersion
=
7.3
def
_flatten
(
tuple
):
res
=
()
...
...
@@ -347,10 +345,10 @@ class Misc:
self
.
tk
.
quit
()
def
_getints
(
self
,
string
):
if
not
string
:
return
None
re
s
=
(
)
for
v
in
self
.
tk
.
splitlist
(
string
):
res
=
res
+
(
self
.
tk
.
getint
(
v
),)
return
res
re
turn
tuple
(
map
(
self
.
tk
.
getint
,
self
.
tk
.
splitlist
(
string
))
)
def
_getdoubles
(
self
,
string
):
if
not
string
:
return
None
return
tuple
(
map
(
self
.
tk
.
getdouble
,
self
.
tk
.
splitlist
(
string
)))
def
_getboolean
(
self
,
string
):
if
string
:
return
self
.
tk
.
getboolean
(
string
)
...
...
@@ -438,29 +436,9 @@ class _CallSafely:
except
SystemExit
,
msg
:
raise
SystemExit
,
msg
except
:
try
:
try
:
t
=
sys
.
exc_traceback
while
t
:
sys
.
stderr
.
write
(
'
%
s, line
%
s
\n
'
%
(
t
.
tb_frame
.
f_code
,
t
.
tb_lineno
))
t
=
t
.
tb_next
finally
:
sys
.
stderr
.
write
(
'
%
s:
%
s
\n
'
%
(
sys
.
exc_type
,
sys
.
exc_value
))
(
sys
.
last_type
,
sys
.
last_value
,
sys
.
last_traceback
)
=
(
sys
.
exc_type
,
sys
.
exc_value
,
sys
.
exc_traceback
)
import
pdb
pdb
.
pm
()
except
:
print
'*** Error in error handling ***'
print
sys
.
exc_type
,
':'
,
sys
.
exc_value
import
traceback
print
"Exception in Tkinter callback"
traceback
.
print_exc
()
class
Wm
:
def
aspect
(
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