mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Convert Tcl path objects to strings. Fixes #661357.
Provide .string attribute and __unicode for Tcl_Objs.
This commit is contained in:
parent
7702304885
commit
25c7b50e8f
2 changed files with 70 additions and 1 deletions
|
@ -55,6 +55,12 @@ class _Dialog(Dialog):
|
|||
if result:
|
||||
# keep directory and filename until next time
|
||||
import os
|
||||
# convert Tcl path objects to strings
|
||||
try:
|
||||
result = result.string
|
||||
except AttributeError:
|
||||
# it already is a string
|
||||
pass
|
||||
path, file = os.path.split(result)
|
||||
self.options["initialdir"] = path
|
||||
self.options["initialfile"] = file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue