0

For example: If login result is success, redirect to main.py from login.py.

However, the problem is unable to use the subprocess.popen to open back login.py in main.py. (Trying to logout to login.py) Is it possible to open back login.py from main.py?

/login.py
subprocess.popen('python','main.py')
quit()
/main.py
subprocess.popen('python','login.py')
  • You seem to be doing something a bit un-pythonesque (there are other ways to split a Python software in multiple files). Regardless of that, have you looked at: https://stackoverflow.com/questions/7152340/using-a-python-subprocess-call-to-invoke-a-python-script ? – Gabriel Devillers Dec 19 '18 at 17:10
  • Possible duplicate of [Using a Python subprocess call to invoke a Python script](https://stackoverflow.com/questions/7152340/using-a-python-subprocess-call-to-invoke-a-python-script) – Daniele Santi Dec 19 '18 at 17:21

0 Answers0