Aug-31-2020, 09:27 PM
What are you trying to do? Are you trying to make an application with two windows? That's easy. Creating two windows is barely any more difficult than making one window. The problem you are having with the example is you call tkinter.Tk() twice. You cannot do that. Tk() creates the Tk application, and you can only have one of those.
Calling a function in one module from another is pretty simple. If you want to write your two window application using two files (modules) that should be no problem. If the code for each window is very similar I think you should read about Python classes. You might see significant code reduction and end up not needing two files (modules).
Calling a function in one module from another is pretty simple. If you want to write your two window application using two files (modules) that should be no problem. If the code for each window is very similar I think you should read about Python classes. You might see significant code reduction and end up not needing two files (modules).