Convert Tcl path objects to strings. Fixes #661357.

Provide .string attribute and __unicode for Tcl_Objs.
This commit is contained in:
Martin v. Löwis 2003-01-04 00:08:09 +00:00
parent 7702304885
commit 25c7b50e8f
2 changed files with 70 additions and 1 deletions

View file

@ -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