I don't use Wx, but from my experience with Tk and Gtk2, a while loop will prevent your Wx event loop from running. This may not be a problem if there is nothing going on in the background, but if there are other timers and filehandle watchers running, they will be stopped during your while loop. The best bet is to use a dialog, or entry to get the info. You could also setup a io (filehandle ) watcher on STDIN, and that would collect input. Dialogs or entrys will work cleaner.