I have a wxPython app, and I am adding update functionality. What I do is I have an update option on a help menu and when that update option is clicked a MessageDialog appears and asks for confirmation. If the user confirms, I use subprocess.Popen to run a seperate script that downloads new updates (if there are any) right now, I have a shell window that opens, and prints what it is doing, however, I want to get rid of the shell window, and replace it with MessageBoxes that appear as output comes from the update script. This needs to be done without hanging up the main GUI. What is the best way to accomplish this?
···
–
Hi, I will kill all ads in google gmail.
no more messy dirty adds!!
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
You'll probably want to redirect stdout to a text control or some kind
of log file. I've used subprocess's PIPE commands to suck info out of
it and post it to a text control before. I'm sure you could do
something similar.
···
On May 24, 1:11 pm, Micah Nordland <mpnordl...@gmail.com> wrote:
I have a wxPython app, and I am adding update functionality. What I do is I
have an update option on a help menu and when that update option is clicked
a MessageDialog appears and asks for confirmation. If the user confirms, I
use subprocess.Popen to run a seperate script that downloads new updates (if
there are any) right now, I have a shell window that opens, and prints what
it is doing, however, I want to get rid of the shell window, and replace it
with MessageBoxes that appear as output comes from the update script. This
needs to be done without hanging up the main GUI. What is the best way to
accomplish this?
1. Don't block the return to the MainLoop from the event handler that will be starting the update script.
2. Use a timer or something similar to periodically read the output from the update script and turn it into whatever kind of status updates you want to show in the UI. Perhaps a wx.ProgressDialog.
I have a wxPython app, and I am adding update functionality. What I do
is I have an update option on a help menu and when that update option is
clicked a MessageDialog appears and asks for confirmation. If the user
confirms, I use subprocess.Popen to run a seperate script that downloads
new updates (if there are any) right now, I have a shell window that
opens, and prints what it is doing, however, I want to get rid of the
shell window, and replace it with MessageBoxes that appear as output
comes from the update script. This needs to be done without hanging up
the main GUI. What is the best way to accomplish this?