Re: How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-13 Thread ville
Sean DiZazzo [EMAIL PROTECTED] writes: My eventual code would be something like: launch_process_in_thread('bzr pull') while not is_done:   pyos_inputhook()   time.sleep(0.1) print Done! I'm still recovering from a hangover, so don't quote me. I think you want the after function:

Re: How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-13 Thread Fredrik Lundh
ville wrote: That's tk-specific, right? I'm looking for a snippet that - Would not be tied to tk upstream, you said: My actual use case is to keep a tkinter application responsive /F -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-08 Thread Sean DiZazzo
On Sep 6, 1:00 pm, [EMAIL PROTECTED] (Ville M. Vainio) wrote: Background: PyOS_InputHook is something that gets run when python is doing raw_input. TkInter and friends use it to run their event loops, so that their events are handled while python is doing raw_input. What I'd like to do is run

How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-06 Thread Ville M. Vainio
Background: PyOS_InputHook is something that gets run when python is doing raw_input. TkInter and friends use it to run their event loops, so that their events are handled while python is doing raw_input. What I'd like to do is run the same function without having to do raw_input. I.e. I'd like