By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

using tkinter from the command prompt window

P: n/a
I can apply my python code using import tkinter within the python shell and it works perfectly (i open some file using tkinter). however, when i try to run the file.py from the command prompt window:
i get an attribute error 'module' object has no attribute 'filedialog'

however, as stated before, the filedialog works when i run the code within the python shell....any suggestions?
Nov 15 '10 #1
Share this Question
Share on Google+
2 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
Try importing filedialog like this:
Expand|Select|Wrap|Line Numbers
  1. import tkinter.filedialog
Nov 15 '10 #2

P: n/a
Thanks! This worked!
Nov 16 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.