Ask Your Question

wingIDE not working with python3+tkinter ???

asked 2019-09-16 07:00:48 -0500

alexxx's avatar

I started the long & painful transition of my tkinter program to python3... I discovered that I have to change the name of a lot of tkinter modules (see, but I'm stumped at this, that could be related to WingIDE:

Launching this code portion by itself works:


from tkinter import *
from tkinter import simpledialog

class PasswordDialog(simpledialog.Dialog):
    def body(self, master):
        Label(master, text="Password for file ").grid(row=0, sticky=W)
        self.e1 = Entry(master,show='*')
        self.e1.grid(row=0, column=1)
        self.attributes("-topmost", True)
        return self.e1
    def apply(self):
        p = self.e1.get()
        self.result = p

def main():
        root = Tk()
        pwd = PasswordDialog(root,title='Enter password').result


while if I write it from WingIDE and run it there by pressing F5, I get:

File "/usr/src/", line 6, in <module>
  class PasswordDialog(simpledialog.Dialog):

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

can anybody see what's wrong???

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-16 07:06:41 -0500

alexxx's avatar

please, disregard my post:

I just discovered that if I want to switch my projact to python3 it isnt sufficient to alter the shebang line, I also have to modify the predefined binary under Source>show python environment


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-09-16 07:00:48 -0500

Seen: 593 times

Last updated: Sep 16 '19