summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/tkFileDialog.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/lib-tk/tkFileDialog.py b/Lib/lib-tk/tkFileDialog.py
index 569254a..63487d2 100644
--- a/Lib/lib-tk/tkFileDialog.py
+++ b/Lib/lib-tk/tkFileDialog.py
@@ -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