Re: [PyOpenGL-Users] IDLE, threads and pyopengl
Brought to you by:
mcfletch
From: JoN <jo...@we...> - 2007-03-14 01:45:40
|
Much thanks Mike and Shane, I'll look into these. Cheers Jon Quoting Shane Holloway <sha...@ie...>: > ipython is certainly doing this. I saw the demo at PyCon, and have > been using it to great effect in debugging and interacting with my wx > app. > > > ipython -wthread > > Works for wxPython guis. --help gives more options and a bit more > insight into it. I'd have a look at what they did to see if it will > work for you as is, or for your own cmd-based interactive app. > > -Shane > > On Mar 12, 2007, at 10:37 PM, Mike C. Fletcher wrote: > > > JoN wrote: > >> And then he realizes he's asked the completely wrong question. > >> > >> What I meant to ask was: > >> > >> Can IDLE - or any python command interpreter for that matter? - be > >> run itself as > >> a pythread ? > >> > > There have been systems that used Idle connected up to a GUI with > > PyOpenGL running in it. I seem to recall systems with IPython and > > a Tk > > OpenGL GUI as well. I haven't done it myself, nor do I know if they > > actually used threads. Normally what happens is that you need to > > arrange to have two event loops running. Some GUIs (wxPython, for > > instance) can handle that using threads as long as you make sure that > > your first import of wxPython is in the secondary thread (IIRC). > > Running an interpreter thread using cmd should allow you to run > > that in > > a background thread and let the GUI use the main thread AFAICS. > > > > I code my own systems using something like the wxPython shell widget > > hooked up to a wxPython GUI, so the system all runs in the same > > thread, > > but that has its own challenges when you want a user to code (e.g. > > they > > want to time.sleep() in a script). > > > > HTH, > > Mike > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > -------------------------------------------------------------------- Come and visit Web Prophets Website at http://www.webprophets.net.au |