tags:

views:

500

answers:

1

I want to select file from a dialog box. Here is code that does all I need but tkMessageBox Not Found. I am using Py3k.

How should I solve this problem?

Or

Is there any other way to create File Dialog in python?

Thanks

+2  A: 

The package Tkinter has been renamed to tkinter in Python 3, as well as other modules related to it. Just replace the following in your code, then it should work:

  • Tkinter -> tkinter
  • tkMessageBox -> tkinter.messagebox
  • tkColorChooser -> tkinter.colorchooser
  • tkFileDialog -> tkinter.filedialog

I advise you to learn how to dynamically browse the modules with the dir command. If you are under windows, configure Python to use readline module to get auto-completion and make it much easier to list available classes in a module.

Mapad
Thank You Very Much!!!
TheMachineCharmer