using tkinter from the command prompt window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcfly

    using tkinter from the command prompt window

    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?
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Try importing filedialog like this:
    Code:
    import tkinter.filedialog

    Comment

    • mcfly

      #3
      Thanks! This worked!

      Comment

      Working...