Restart app on kivy

Post here if you need help with creating a Graphical User Interface in Python.

Restart app on kivy

Postby pyjiggly » Thu Sep 22, 2016 4:28 pm

os.execl(sys.executable, sys.executable, *sys.argv) --- restarts the app on desktop.

Is there any other way to do this when the app is running on android using kivy?
pyjiggly
 
Posts: 3
Joined: Mon Sep 19, 2016 4:24 pm

Re: Restart app on kivy

Postby nilamo » Thu Sep 22, 2016 4:42 pm

Why?

Unless you're doing something wacky (like, super wacky), this shouldn't ever be something you should be doing.
This forum is shutting down. Future discussion should take place at http://python-forum.io
User avatar
nilamo
 
Posts: 87
Joined: Thu Jul 21, 2016 8:00 pm
Location: Michigan

Re: Restart app on kivy

Postby pyjiggly » Thu Sep 22, 2016 5:07 pm

Well, All I am trying to do is have the app reset (all the buttons on multiple screens) on a button click existing on one of the screens. The os.exec() restarts the process afresh on desktop. But when I run the app in kivy on android, the process -app does not restart again. Is there any way to achieve this?
pyjiggly
 
Posts: 3
Joined: Mon Sep 19, 2016 4:24 pm

Re: Restart app on kivy

Postby nilamo » Thu Sep 22, 2016 5:27 pm

I think the better way to do that would be to avoid os calls at all. Your gui is probably a class/object, right? So why not just create a new instance to initialize everything to defaults?
This forum is shutting down. Future discussion should take place at http://python-forum.io
User avatar
nilamo
 
Posts: 87
Joined: Thu Jul 21, 2016 8:00 pm
Location: Michigan


Return to GUI

Who is online

Users browsing this forum: No registered users and 4 guests