Title: askopenfilename is missing from the Tkinter filedialog library in 2.7.17
Type: Stage: resolved
Components: Tkinter Versions: Python 2.7
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, rdnielsen
Priority: normal Keywords:

Created on 2020-01-17 14:47 by rdnielsen, last changed 2020-01-17 19:10 by ned.deily. This issue is now closed.

Messages (2)
msg360194 - (view) Author: Dreas Nielsen (rdnielsen) Date: 2020-01-17 14:47
In Python 2.7.17 on Linux, the code:

    import tkinter.filedialog as tkfiledialog

results in:

    AttributeError: 'module' object has no attribute 'askopenfilename'

Any attempt to use 'askopenfilename' has the same result, of course.
msg360208 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-01-17 19:10
In Python 2, askopenfilename was in the separate tkFileDialog module:

>>> import tkFileDialog
>>> dir(tkFileDialog.askopenfilename)
['__call__',  ...

"Other modules that provide Tk support include:
Common dialogs to allow the user to specify a file to open or save.
These have been renamed as well in Python 3; they were all made submodules of the new tkinter package."
Date User Action Args
2020-01-17 19:10:34ned.deilysetstatus: open -> closed

type: crash ->

nosy: + ned.deily
messages: + msg360208
resolution: not a bug
stage: resolved
2020-01-17 14:47:07rdnielsencreate