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
c4570487
Kaydet (Commit)
c4570487
authored
Mar 20, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Give in to the tab police.
üst
6f73c1a2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
122 deletions
+132
-122
Canvas.py
Lib/lib-tk/Canvas.py
+18
-18
FileDialog.py
Lib/lib-tk/FileDialog.py
+0
-0
SimpleDialog.py
Lib/lib-tk/SimpleDialog.py
+78
-78
Tkinter.py
Lib/lib-tk/Tkinter.py
+27
-17
tkCommonDialog.py
Lib/lib-tk/tkCommonDialog.py
+3
-3
tkFileDialog.py
Lib/lib-tk/tkFileDialog.py
+6
-6
No files found.
Lib/lib-tk/Canvas.py
Dosyayı görüntüle @
c4570487
...
@@ -78,41 +78,41 @@ class CanvasItem:
...
@@ -78,41 +78,41 @@ class CanvasItem:
return
self
.
canvas
.
type
(
self
.
id
)
return
self
.
canvas
.
type
(
self
.
id
)
class
Arc
(
CanvasItem
):
class
Arc
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'arc'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'arc'
)
+
args
,
kw
)
class
Bitmap
(
CanvasItem
):
class
Bitmap
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'bitmap'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'bitmap'
)
+
args
,
kw
)
class
ImageItem
(
CanvasItem
):
class
ImageItem
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'image'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'image'
)
+
args
,
kw
)
class
Line
(
CanvasItem
):
class
Line
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'line'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'line'
)
+
args
,
kw
)
class
Oval
(
CanvasItem
):
class
Oval
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'oval'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'oval'
)
+
args
,
kw
)
class
Polygon
(
CanvasItem
):
class
Polygon
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'polygon'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'polygon'
)
+
args
,
kw
)
class
Rectangle
(
CanvasItem
):
class
Rectangle
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'rectangle'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'rectangle'
)
+
args
,
kw
)
# XXX "Text" is taken by the Text widget...
# XXX "Text" is taken by the Text widget...
class
CanvasText
(
CanvasItem
):
class
CanvasText
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'text'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'text'
)
+
args
,
kw
)
class
Window
(
CanvasItem
):
class
Window
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'window'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'window'
)
+
args
,
kw
)
class
Group
:
class
Group
:
def
__init__
(
self
,
canvas
,
tag
=
None
):
def
__init__
(
self
,
canvas
,
tag
=
None
):
...
...
Lib/lib-tk/FileDialog.py
Dosyayı görüntüle @
c4570487
This diff is collapsed.
Click to expand it.
Lib/lib-tk/SimpleDialog.py
Dosyayı görüntüle @
c4570487
...
@@ -7,99 +7,99 @@ from Tkinter import *
...
@@ -7,99 +7,99 @@ from Tkinter import *
class
SimpleDialog
:
class
SimpleDialog
:
def
__init__
(
self
,
master
,
def
__init__
(
self
,
master
,
text
=
''
,
buttons
=
[],
default
=
None
,
cancel
=
None
,
text
=
''
,
buttons
=
[],
default
=
None
,
cancel
=
None
,
title
=
None
,
class_
=
None
):
title
=
None
,
class_
=
None
):
if
class_
:
if
class_
:
self
.
root
=
Toplevel
(
master
,
class_
=
class_
)
self
.
root
=
Toplevel
(
master
,
class_
=
class_
)
else
:
else
:
self
.
root
=
Toplevel
(
master
)
self
.
root
=
Toplevel
(
master
)
if
title
:
if
title
:
self
.
root
.
title
(
title
)
self
.
root
.
title
(
title
)
self
.
root
.
iconname
(
title
)
self
.
root
.
iconname
(
title
)
self
.
message
=
Message
(
self
.
root
,
text
=
text
,
aspect
=
400
)
self
.
message
=
Message
(
self
.
root
,
text
=
text
,
aspect
=
400
)
self
.
message
.
pack
(
expand
=
1
,
fill
=
BOTH
)
self
.
message
.
pack
(
expand
=
1
,
fill
=
BOTH
)
self
.
frame
=
Frame
(
self
.
root
)
self
.
frame
=
Frame
(
self
.
root
)
self
.
frame
.
pack
()
self
.
frame
.
pack
()
self
.
num
=
default
self
.
num
=
default
self
.
cancel
=
cancel
self
.
cancel
=
cancel
self
.
default
=
default
self
.
default
=
default
self
.
root
.
bind
(
'<Return>'
,
self
.
return_event
)
self
.
root
.
bind
(
'<Return>'
,
self
.
return_event
)
for
num
in
range
(
len
(
buttons
)):
for
num
in
range
(
len
(
buttons
)):
s
=
buttons
[
num
]
s
=
buttons
[
num
]
b
=
Button
(
self
.
frame
,
text
=
s
,
b
=
Button
(
self
.
frame
,
text
=
s
,
command
=
(
lambda
self
=
self
,
num
=
num
:
self
.
done
(
num
)))
command
=
(
lambda
self
=
self
,
num
=
num
:
self
.
done
(
num
)))
if
num
==
default
:
if
num
==
default
:
b
.
config
(
relief
=
RIDGE
,
borderwidth
=
8
)
b
.
config
(
relief
=
RIDGE
,
borderwidth
=
8
)
b
.
pack
(
side
=
LEFT
,
fill
=
BOTH
,
expand
=
1
)
b
.
pack
(
side
=
LEFT
,
fill
=
BOTH
,
expand
=
1
)
self
.
root
.
protocol
(
'WM_DELETE_WINDOW'
,
self
.
wm_delete_window
)
self
.
root
.
protocol
(
'WM_DELETE_WINDOW'
,
self
.
wm_delete_window
)
self
.
_set_transient
(
master
)
self
.
_set_transient
(
master
)
def
_set_transient
(
self
,
master
,
relx
=
0.5
,
rely
=
0.3
):
def
_set_transient
(
self
,
master
,
relx
=
0.5
,
rely
=
0.3
):
widget
=
self
.
root
widget
=
self
.
root
widget
.
withdraw
()
# Remain invisible while we figure out the geometry
widget
.
withdraw
()
# Remain invisible while we figure out the geometry
widget
.
transient
(
master
)
widget
.
transient
(
master
)
widget
.
update_idletasks
()
# Actualize geometry information
widget
.
update_idletasks
()
# Actualize geometry information
if
master
.
winfo_ismapped
():
if
master
.
winfo_ismapped
():
m_width
=
master
.
winfo_width
()
m_width
=
master
.
winfo_width
()
m_height
=
master
.
winfo_height
()
m_height
=
master
.
winfo_height
()
m_x
=
master
.
winfo_rootx
()
m_x
=
master
.
winfo_rootx
()
m_y
=
master
.
winfo_rooty
()
m_y
=
master
.
winfo_rooty
()
else
:
else
:
m_width
=
master
.
winfo_screenwidth
()
m_width
=
master
.
winfo_screenwidth
()
m_height
=
master
.
winfo_screenheight
()
m_height
=
master
.
winfo_screenheight
()
m_x
=
m_y
=
0
m_x
=
m_y
=
0
w_width
=
widget
.
winfo_reqwidth
()
w_width
=
widget
.
winfo_reqwidth
()
w_height
=
widget
.
winfo_reqheight
()
w_height
=
widget
.
winfo_reqheight
()
x
=
m_x
+
(
m_width
-
w_width
)
*
relx
x
=
m_x
+
(
m_width
-
w_width
)
*
relx
y
=
m_y
+
(
m_height
-
w_height
)
*
rely
y
=
m_y
+
(
m_height
-
w_height
)
*
rely
if
x
+
w_width
>
master
.
winfo_screenwidth
():
if
x
+
w_width
>
master
.
winfo_screenwidth
():
x
=
master
.
winfo_screenwidth
()
-
w_width
x
=
master
.
winfo_screenwidth
()
-
w_width
elif
x
<
0
:
elif
x
<
0
:
x
=
0
x
=
0
if
y
+
w_height
>
master
.
winfo_screenheight
():
if
y
+
w_height
>
master
.
winfo_screenheight
():
y
=
master
.
winfo_screenheight
()
-
w_height
y
=
master
.
winfo_screenheight
()
-
w_height
elif
y
<
0
:
elif
y
<
0
:
y
=
0
y
=
0
widget
.
geometry
(
"+
%
d+
%
d"
%
(
x
,
y
))
widget
.
geometry
(
"+
%
d+
%
d"
%
(
x
,
y
))
widget
.
deiconify
()
# Become visible at the desired location
widget
.
deiconify
()
# Become visible at the desired location
def
go
(
self
):
def
go
(
self
):
self
.
root
.
grab_set
()
self
.
root
.
grab_set
()
self
.
root
.
mainloop
()
self
.
root
.
mainloop
()
self
.
root
.
destroy
()
self
.
root
.
destroy
()
return
self
.
num
return
self
.
num
def
return_event
(
self
,
event
):
def
return_event
(
self
,
event
):
if
self
.
default
is
None
:
if
self
.
default
is
None
:
self
.
root
.
bell
()
self
.
root
.
bell
()
else
:
else
:
self
.
done
(
self
.
default
)
self
.
done
(
self
.
default
)
def
wm_delete_window
(
self
):
def
wm_delete_window
(
self
):
if
self
.
cancel
is
None
:
if
self
.
cancel
is
None
:
self
.
root
.
bell
()
self
.
root
.
bell
()
else
:
else
:
self
.
done
(
self
.
cancel
)
self
.
done
(
self
.
cancel
)
def
done
(
self
,
num
):
def
done
(
self
,
num
):
self
.
num
=
num
self
.
num
=
num
self
.
root
.
quit
()
self
.
root
.
quit
()
def
test
():
def
test
():
root
=
Tk
()
root
=
Tk
()
def
doit
(
root
=
root
):
def
doit
(
root
=
root
):
d
=
SimpleDialog
(
root
,
d
=
SimpleDialog
(
root
,
text
=
"This is a test dialog. "
text
=
"This is a test dialog. "
"Would this have been an actual dialog, "
"Would this have been an actual dialog, "
"the buttons below would have been glowing "
"the buttons below would have been glowing "
"in soft pink light.
\n
"
"in soft pink light.
\n
"
"Do you believe this?"
,
"Do you believe this?"
,
buttons
=
[
"Yes"
,
"No"
,
"Cancel"
],
buttons
=
[
"Yes"
,
"No"
,
"Cancel"
],
default
=
0
,
default
=
0
,
cancel
=
2
,
cancel
=
2
,
title
=
"Test Dialog"
)
title
=
"Test Dialog"
)
print
d
.
go
()
print
d
.
go
()
t
=
Button
(
root
,
text
=
'Test'
,
command
=
doit
)
t
=
Button
(
root
,
text
=
'Test'
,
command
=
doit
)
t
.
pack
()
t
.
pack
()
q
=
Button
(
root
,
text
=
'Quit'
,
command
=
t
.
quit
)
q
=
Button
(
root
,
text
=
'Quit'
,
command
=
t
.
quit
)
...
...
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
c4570487
...
@@ -51,8 +51,14 @@ def _cnfmerge(cnfs):
...
@@ -51,8 +51,14 @@ def _cnfmerge(cnfs):
class
Event
:
class
Event
:
pass
pass
_support_default_root
=
1
_default_root
=
None
_default_root
=
None
def
NoDefaultRoot
():
global
_support_default_root
_support_default_root
=
0
del
_default_root
def
_tkerror
(
err
):
def
_tkerror
(
err
):
pass
pass
...
@@ -536,7 +542,7 @@ class Misc:
...
@@ -536,7 +542,7 @@ class Misc:
if
needcleanup
:
if
needcleanup
:
if
self
.
_tclCommands
is
None
:
if
self
.
_tclCommands
is
None
:
self
.
_tclCommands
=
[]
self
.
_tclCommands
=
[]
self
.
_tclCommands
.
append
(
name
)
self
.
_tclCommands
.
append
(
name
)
#print '+ Tkinter created command', name
#print '+ Tkinter created command', name
return
name
return
name
register
=
_register
register
=
_register
...
@@ -702,6 +708,7 @@ class Misc:
...
@@ -702,6 +708,7 @@ class Misc:
# Support for the "event" command, new in Tk 4.2.
# Support for the "event" command, new in Tk 4.2.
# By Case Roole.
# By Case Roole.
# XXX Why is this using the default root?
def
event_add
(
self
,
virtual
,
*
sequences
):
def
event_add
(
self
,
virtual
,
*
sequences
):
args
=
(
'event'
,
'add'
,
virtual
)
+
sequences
args
=
(
'event'
,
'add'
,
virtual
)
+
sequences
...
@@ -795,7 +802,7 @@ class Wm:
...
@@ -795,7 +802,7 @@ class Wm:
def
positionfrom
(
self
,
who
=
None
):
def
positionfrom
(
self
,
who
=
None
):
return
self
.
tk
.
call
(
'wm'
,
'positionfrom'
,
self
.
_w
,
who
)
return
self
.
tk
.
call
(
'wm'
,
'positionfrom'
,
self
.
_w
,
who
)
def
protocol
(
self
,
name
=
None
,
func
=
None
):
def
protocol
(
self
,
name
=
None
,
func
=
None
):
if
callable
(
func
):
if
callable
(
func
):
command
=
self
.
_register
(
func
)
command
=
self
.
_register
(
func
)
else
:
else
:
command
=
func
command
=
func
...
@@ -857,14 +864,14 @@ class Tk(Misc, Wm):
...
@@ -857,14 +864,14 @@ class Tk(Misc, Wm):
self
.
tk
.
createcommand
(
'tkerror'
,
_tkerror
)
self
.
tk
.
createcommand
(
'tkerror'
,
_tkerror
)
self
.
tk
.
createcommand
(
'exit'
,
_exit
)
self
.
tk
.
createcommand
(
'exit'
,
_exit
)
self
.
readprofile
(
baseName
,
className
)
self
.
readprofile
(
baseName
,
className
)
if
not
_default_root
:
if
_support_default_root
and
not
_default_root
:
_default_root
=
self
_default_root
=
self
def
destroy
(
self
):
def
destroy
(
self
):
for
c
in
self
.
children
.
values
():
c
.
destroy
()
for
c
in
self
.
children
.
values
():
c
.
destroy
()
self
.
tk
.
call
(
'destroy'
,
self
.
_w
)
self
.
tk
.
call
(
'destroy'
,
self
.
_w
)
Misc
.
destroy
(
self
)
Misc
.
destroy
(
self
)
global
_default_root
global
_default_root
if
_default_root
is
self
:
if
_
support_default_root
and
_
default_root
is
self
:
_default_root
=
None
_default_root
=
None
def
readprofile
(
self
,
baseName
,
className
):
def
readprofile
(
self
,
baseName
,
className
):
import
os
import
os
...
@@ -994,13 +1001,14 @@ class Grid:
...
@@ -994,13 +1001,14 @@ class Grid:
class
BaseWidget
(
Misc
):
class
BaseWidget
(
Misc
):
def
_setup
(
self
,
master
,
cnf
):
def
_setup
(
self
,
master
,
cnf
):
global
_default_root
if
_support_default_root
:
if
not
master
:
global
_default_root
if
not
master
:
if
not
_default_root
:
_default_root
=
Tk
()
master
=
_default_root
if
not
_default_root
:
if
not
_default_root
:
_default_root
=
Tk
()
_default_root
=
master
master
=
_default_root
if
not
_default_root
:
_default_root
=
master
self
.
master
=
master
self
.
master
=
master
self
.
tk
=
master
.
tk
self
.
tk
=
master
.
tk
name
=
None
name
=
None
...
@@ -1693,10 +1701,12 @@ class OptionMenu(Menubutton):
...
@@ -1693,10 +1701,12 @@ class OptionMenu(Menubutton):
self
.
__menu
=
None
self
.
__menu
=
None
class
Image
:
class
Image
:
def
__init__
(
self
,
imgtype
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
imgtype
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
self
.
name
=
None
self
.
name
=
None
master
=
_default_root
if
not
master
:
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
master
=
_default_root
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
self
.
tk
=
master
.
tk
self
.
tk
=
master
.
tk
if
not
name
:
if
not
name
:
name
=
`id(self)`
name
=
`id(self)`
...
@@ -1741,8 +1751,8 @@ class Image:
...
@@ -1741,8 +1751,8 @@ class Image:
self
.
tk
.
call
(
'image'
,
'width'
,
self
.
name
))
self
.
tk
.
call
(
'image'
,
'width'
,
self
.
name
))
class
PhotoImage
(
Image
):
class
PhotoImage
(
Image
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
apply
(
Image
.
__init__
,
(
self
,
'photo'
,
name
,
cnf
),
kw
)
apply
(
Image
.
__init__
,
(
self
,
'photo'
,
name
,
cnf
,
master
),
kw
)
def
blank
(
self
):
def
blank
(
self
):
self
.
tk
.
call
(
self
.
name
,
'blank'
)
self
.
tk
.
call
(
self
.
name
,
'blank'
)
def
cget
(
self
,
option
):
def
cget
(
self
,
option
):
...
@@ -1784,8 +1794,8 @@ class PhotoImage(Image):
...
@@ -1784,8 +1794,8 @@ class PhotoImage(Image):
apply
(
self
.
tk
.
call
,
args
)
apply
(
self
.
tk
.
call
,
args
)
class
BitmapImage
(
Image
):
class
BitmapImage
(
Image
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
apply
(
Image
.
__init__
,
(
self
,
'bitmap'
,
name
,
cnf
),
kw
)
apply
(
Image
.
__init__
,
(
self
,
'bitmap'
,
name
,
cnf
,
master
),
kw
)
def
image_names
():
return
_default_root
.
tk
.
call
(
'image'
,
'names'
)
def
image_names
():
return
_default_root
.
tk
.
call
(
'image'
,
'names'
)
def
image_types
():
return
_default_root
.
tk
.
call
(
'image'
,
'types'
)
def
image_types
():
return
_default_root
.
tk
.
call
(
'image'
,
'types'
)
...
...
Lib/lib-tk/tkCommonDialog.py
Dosyayı görüntüle @
c4570487
...
@@ -25,7 +25,7 @@ class Dialog:
...
@@ -25,7 +25,7 @@ class Dialog:
if
TkVersion
<
4.2
:
if
TkVersion
<
4.2
:
raise
TclError
,
"this module requires Tk 4.2 or newer"
raise
TclError
,
"this module requires Tk 4.2 or newer"
self
.
master
=
master
self
.
master
=
master
self
.
options
=
options
self
.
options
=
options
def
_fixoptions
(
self
):
def
_fixoptions
(
self
):
...
@@ -37,8 +37,8 @@ class Dialog:
...
@@ -37,8 +37,8 @@ class Dialog:
def
show
(
self
,
**
options
):
def
show
(
self
,
**
options
):
# update instance options
# update instance options
for
k
,
v
in
options
.
items
():
for
k
,
v
in
options
.
items
():
self
.
options
[
k
]
=
v
self
.
options
[
k
]
=
v
self
.
_fixoptions
()
self
.
_fixoptions
()
...
...
Lib/lib-tk/tkFileDialog.py
Dosyayı görüntüle @
c4570487
...
@@ -41,14 +41,14 @@ class _Dialog(Dialog):
...
@@ -41,14 +41,14 @@ class _Dialog(Dialog):
pass
pass
def
_fixresult
(
self
,
widget
,
result
):
def
_fixresult
(
self
,
widget
,
result
):
if
result
:
if
result
:
# keep directory and filename until next time
# keep directory and filename until next time
import
os
import
os
path
,
file
=
os
.
path
.
split
(
result
)
path
,
file
=
os
.
path
.
split
(
result
)
self
.
options
[
"initialdir"
]
=
path
self
.
options
[
"initialdir"
]
=
path
self
.
options
[
"initialfile"
]
=
file
self
.
options
[
"initialfile"
]
=
file
self
.
filename
=
result
# compatibility
self
.
filename
=
result
# compatibility
return
result
return
result
#
#
...
...
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