I tried ctypes first, but with no luck.  Here is what I tried:<br><br>>>> import readline<br>
>>> import <span class="il">ctypes</span><br>
>>> <span class="il">ctypes</span>.pythonapi.PyOS_<div id=":20" class="ii gt">InputHook<br>
<_FuncPtr object at 0x76420><br>
>>> def my_callback():<br>
...   print "In am here"<br>
...   return 0<br>
...<br>
>>> cbf = <span class="il">ctypes</span>.CFUNCTYPE(<span class="il">ctypes</span>.c_int)(my_callback)<br>
>>> cbf<br>
<CFunctionType object at 0x769d0><br>
>>> <span class="il">ctypes</span>.pythonapi.PyOS_InputHook = cbf<br>
</div><br>Do you see anything wrong with this?<br><br>I should probably try it again to see if I can make it work though.<br><br>Cheers,<br><br>Brian<br><br><div class="gmail_quote">On Thu, Jul 16, 2009 at 11:35 AM, Robert Kern <span dir="ltr"><<a href="mailto:robert.kern@gmail.com" target="_blank">robert.kern@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>On 2009-07-16 13:11, Ville M. Vainio wrote:<br>
> On Thu, Jul 16, 2009 at 9:06 PM, Brian Granger<<a href="http://ellisonbg.net" target="_blank">ellisonbg.net</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>>  wrote:<br>
><br>
>> I am fully aware that some environments upgrade things like GUI toolkits<br>
>> over very long time scales.  More important - there isn't a released version<br>
>> of wx that has these capabilities in it.  It will be a long time before<br>
><br>
> I thought you were able to make wx work with a cython-based<br>
> PyOS_InputHook extension. Possibly a C-based extension could fix this<br>
> issue for users of old wx versions?<br>
<br>
</div></div>Or even just a bit of ctypes?<br>
<br>
--<br>
Robert Kern<br>
<br>
"I have come to believe that the whole world is an enigma, a harmless enigma<br>
  that is made terrible by our own mad attempt to interpret it as though it had<br>
  an underlying truth."<br>
   -- Umberto Eco<br>
<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br>