Bugs item #1233799, was opened at 2005-07-06 17:08 Message generated for change (Comment added) made by jepler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1233799&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tkinter Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: Russell Owen (reowen) Assigned to: Martin v. Löwis (loewis) Summary: tkFileDialog.askopen... fails when dir="" Initial Comment: The following simple code fails on MacOS X 10.3 running the built- in python 2.3 and Aqua Tcl/Tk 8.4.9: import Tkinter import tkFileDialog root = Tkinter.Tk() newPath = tkFileDialog.askopenfilename( initialdir = "", ) The error is: Traceback (most recent call last): File "tkFileDialog_askopen bug.py", line 5, in ? newPath = tkFileDialog.askopenfilename( File "/System/Library/Frameworks/Python.framework/Versions/2.3/ lib/python2.3/lib-tk/tkFileDialog.py", line 119, in askopenfilename return Open(**options).show() File "/System/Library/Frameworks/Python.framework/Versions/2.3/ lib/python2.3/lib-tk/tkCommonDialog.py", line 52, in show s = w.tk.call(self.command, *w._options(self.options)) _tkinter.TclError: bad directory "" The same code runs fine on unix Python 2.2.3 with unknown tcl/tk and on and unix Python 2.4.1 with tcl/tk 8.4.9. it starts out in the user's home directory as I'd expect. Mind you, I know I can use None or not specify the initialdir argument. But in my code it's a string that *might* be empty. ---------------------------------------------------------------------- Comment By: Jeff Epler (jepler) Date: 2005-07-12 08:10 Message: Logged In: YES user_id=2772 At first glance, this appears to be a bug or an incompatible change in Tk between the old version and Aqua 8.4.9. If you know the name of the 'wish' executable that uses the same version of Tcl/Tk as your Python 2.3, please check whether the tcl command tk_getOpenFile -initialdir {} fails. If it does, then this is a Tcl/Tk bug or incompatible change, and I believe this tracker item should be closed. Only if that works, but the Python equivalent doesn't, is there a reason to treat this as a bug in Python/Tkinter. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1233799&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com