[wxPython-users] Command window not getting closed

Alec Bennett whatyoulookin at yahoo.com
Tue Feb 26 11:26:55 PST 2008


> And i m not able to read the error message as it gets poped up and closed
> within a fraction of a second.. is there any way to hold the command window
> so that i can read the error ??? like in a c program you have getch()
> command which would wait for a keyboard input and then closes the cmd....

Try running it from the from commandline. So get a console window (start --> run --> command) and
navigate to your script directory and run the script from there.





--- Varsha Purohit <varsha.purohit at gmail.com> wrote:

> yeahh i m talkin abt the dos command window....
> 
> even when i am not executing the code and directly close the GUI application
> it prompts some message.. so i m thinking what can be the problem. i used
> sys.exit() because i have threads running in the program and i was not able
> to find a decent way to stop them before closing the application.
> 
> And i m not able to read the error message as it gets poped up and closed
> within a fraction of a second.. is there any way to hold the command window
> so that i can read the error ??? like in a c program you have getch()
> command which would wait for a keyboard input and then closes the cmd....
> 
> thanks,
> 
> On Mon, Feb 25, 2008 at 10:45 AM, Robin Dunn <robin at alldunn.com> wrote:
> 
> > Varsha Purohit wrote:
> > > Hello All,
> > >
> > >         I have made a GUI program, when i click on the close button the
> > > command window is not getting closed. Here is the program for the close
> > > button...
> > >
> > > def OnCloseWindow(self,event):
> > >         self.timer.Stop()
> > >         sys.exit()
> > >         self.Destroy()
> > >
> > > Can anyone tell me what is the problem?
> >
> > When you say "command window" do you mean the DOS command-line window or
> > a window that is part of your application and that has the function
> > above bound as the EVT_CLOSE handler?
> >
> > In either case, try removing the sys.exit so the self.Destroy() call can
> > happen.  (sys.exit simply raises a SystemExit exception which is
> > probably being caught by the normal exception checking code in the wx
> > wrappers, but it is causing the Destroy to be bypassed because of the
> > exception.)
> >
> > --
> > Robin Dunn
> > Software Craftsman
> > http://wxPython.org  Java give you jitters?  Relax with wxPython!
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
> >
> >
> 
> 
> -- 
> Varsha Purohit,
> Graduate Student
> 



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping




More information about the wxpython-users mailing list