Restarting a program on GUI exit?

I have a small program that runs on user login, takes some details then saves them to a file.

The desired behaviour is that when this program has finished, another window appears which the user needs to click at logoff.
At that point, the first program should run again.

I'm not quite sure how best to do this, while fitting in with wxPython's mainloop structure i.e. having one program invoke another when the GUI has finished.

Adam

Why don't you spawn another process from your app and quit the current
one? This looks like a restart to the user.

- Jorgen

ยทยทยท

On Tue, Aug 12, 2008 at 5:29 PM, Adam Huffman <adam.huffman@gmail.com> wrote:

I have a small program that runs on user login, takes some details then
saves them to a file.

The desired behaviour is that when this program has finished, another window
appears which the user needs to click at logoff.
At that point, the first program should run again.

I'm not quite sure how best to do this, while fitting in with wxPython's
mainloop structure i.e. having one program invoke another when the GUI has
finished.

Adam

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Adam Huffman wrote:

I have a small program that runs on user login, takes some details then saves them to a file.

The desired behaviour is that when this program has finished, another window appears which the user needs to click at logoff.
At that point, the first program should run again.

I'm not quite sure how best to do this, while fitting in with wxPython's mainloop structure i.e. having one program invoke another when the GUI has finished.

Adam

I'm not sure I follow. Are you wanting a wxPython app that runs when the user logs into their PC or does your wx app itself have a login dialog? Either way, it's fairly easy to create a form that the user can fill in and then press a "Save" or "OK" button. Then in that button's handler, you'd have it write the data to disk or a database. I'm not sure why you'd want it to disappear and show some additional window to logoff of. I'd just do both: Save and logoff in one handler. Or are you just wanting to clear the form after saving it?

Mike