[Tutor] How to put an event into the Tcl/Tk event queue?

Daniel Knierim tknierim at mail.ieway.com
Sun Aug 26 02:02:42 CEST 2007

Hi All,

I'm starting to learn how to use the TkInter module.  So far I've got a couple versions of 'hello world' working.

I'd like to simulate user input to TkInter applications from another Python script, by inserting events in the Tcl event queue.  Tcl/Tk has a couple functions for this (Tk_QueueWindowEvent and Tcl_QueueEvent).  Is there a Python interface for either of those?  I can't find any...

My second choice would be to use Tcl_CreateEventSource, but I don't see a Python interface for that, either.

I'd rather not work through the actual GUI interface if I can avoid it.  

- Dan K.

More information about the Tutor mailing list