Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

askopenfilename is missing from the Tkinter filedialog library in 2.7.17 #83551

Closed
rdnielsen mannequin opened this issue Jan 17, 2020 · 2 comments
Closed

askopenfilename is missing from the Tkinter filedialog library in 2.7.17 #83551

rdnielsen mannequin opened this issue Jan 17, 2020 · 2 comments

Comments

@rdnielsen
Copy link
Mannequin

rdnielsen mannequin commented Jan 17, 2020

BPO 39370
Nosy @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-01-17.19:10:34.339>
created_at = <Date 2020-01-17.14:47:07.552>
labels = ['invalid', 'expert-tkinter']
title = 'askopenfilename is missing from the Tkinter filedialog library in 2.7.17'
updated_at = <Date 2020-01-17.19:10:34.333>
user = 'https://bugs.python.org/rdnielsen'

bugs.python.org fields:

activity = <Date 2020-01-17.19:10:34.333>
actor = 'ned.deily'
assignee = 'none'
closed = True
closed_date = <Date 2020-01-17.19:10:34.339>
closer = 'ned.deily'
components = ['Tkinter']
creation = <Date 2020-01-17.14:47:07.552>
creator = 'rdnielsen'
dependencies = []
files = []
hgrepos = []
issue_num = 39370
keywords = []
message_count = 2.0
messages = ['360194', '360208']
nosy_count = 2.0
nosy_names = ['ned.deily', 'rdnielsen']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue39370'
versions = ['Python 2.7']

@rdnielsen
Copy link
Mannequin Author

rdnielsen mannequin commented Jan 17, 2020

In Python 2.7.17 on Linux, the code:

    import tkinter.filedialog as tkfiledialog
    dir(tkfiledialog.askopenfilename)

results in:

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

Any attempt to use 'askopenfilename' has the same result, of course.

@rdnielsen rdnielsen mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-tkinter labels Jan 17, 2020
@ned-deily
Copy link
Member

In Python 2, askopenfilename was in the separate tkFileDialog module:

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

https://docs.python.org/2/library/tkinter.html?highlight=tkfiledialog#tkinter-modules

"Other modules that provide Tk support include:
[...]
tkFileDialog
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."

@ned-deily ned-deily added invalid and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jan 17, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant