def SignUp():
base.destroy()
import signup
def Signin():
base.destroy()
import main
Using this code allows me to switch between frames twice but then it stops working if I try to switch back and forth between frames.
What is the problem?
>Solution :
The import statement only "works" the first time it is executed.
It sounds like you have some modules with code in it which is executed when imported.
You should change your modules to have that code all in functions which can be called on demand.
You could change your code to something like this:
import signup
import main
def SignUp():
base.destroy()
signup.main()
def Signin():
base.destroy()
main.main()
Obviously you will need to have some functions called def main(): inside both modules.