Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6764113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:33:21+00:00 2026-05-26T14:33:21+00:00

Where is the tkFileDialog module in Python 3? The question Choosing a file in

  • 0

Where is the tkFileDialog module in Python 3? The question Choosing a file in Python with simple Dialog references the module using:

from Tkinter import Tk
from tkFileDialog import askopenfilename

but using that (after changing Tkinter to tkinter) in Python 3 gets:

Traceback (most recent call last):
  File "C:\Documents and Settings\me\My Documents\file.pyw", line 5, in <module>
    import tkFileDialog
ImportError: No module named tkFileDialog

The python 2.7.2 doc (docs.python.org) says:

tkFileDialog
Common dialogs to allow the user to specify a file to open or save.

These have been renamed as well in Python 3.0; they were all made submodules of the new tkinter package.

but it gives no hint what the new names would be, and searching for tkFileDialog and askopenfilename in the 3.2.2 docs returns nothing at all (not even a mapping from the old names to the new submodule names.)

Trying the obvious doesn’t do jack:

from tkinter import askopenfilename, asksaveasfilename
ImportError: cannot import name askopenfilename

How do you call the equivalent of askopenfilename() in Python 3?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:33:21+00:00Added an answer on May 26, 2026 at 2:33 pm

    You’re looking for tkinter.filedialog as noted in the docs.

    from tkinter import filedialog
    

    You can look at what methods/classes are in filedialog by running help(filedialog) in the python interpreter. I think filedialog.LoadFileDialog is what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using: file = tkFileDialog.askopenfile(parent=root, mode='rb', filetypes=[('Subrip Subtitle File','*.srt')], title='Choose a subtitle file')
I am using tkinter to write a simple GUI program to plot figure of
new guy here and I'm slowly getting the hang of python, but I have
I'm unable to find any way to load .bmp file into Tkinter() so that
I'm trying to open a .txt file with Python. I'm trying to fill a
I'm writing a python script that takes a file one at a time or
I have just started using Tkinter for a programming class and am having a
I have this code: filename = tkFileDialog.askopenfilename(initialdir=lists/custom/, filetypes=((Word list, *.tldr), (All files, *.*))) If
Possible Duplicate: How can I monitor Tkinter buttons when Python is busy? I have
I am trying to count the number times Tmp occurs in a file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.