[IPython-dev] Re: [SciPy-dev] Generic gui_thread + IPython: solution already exists!

Prabhu Ramachandran prabhu_r at users.sf.net
Mon Nov 15 13:17:02 EST 2004

>>>>> "JH" == John Hunter <jdhunter at ace.bsd.uchicago.edu> writes:

>>>>> "Prabhu" == Prabhu Ramachandran <prabhu_r at users.sf.net> writes:
    JH> Hmm.  I'm not experiencing any problems with iptyhon 0.6.4 or
    JH> cvs ipython, but with the patched shell I'm getting very
    JH> frequent freezes

Sorry about the problems.  This is indeed quite wierd.  I did not
realize that the Tkinter updating could cause so many problems.

    JH> def update_tk(tk):
    JH> Note I am not otherwise using tk in my environment - could
    JH> this be a source of the difference that we are seeing?

Yep, that is the only possible problem we might be having, since apart
from the hijacking, and the tk support there is nothing else my patch
really does.

    JH> No, I don't have a wx._core._core_ (or anything like it)
    JH> 3 >>> print [name for name in dir(wx._core) if
    JH> name.startswith('_c')] []
    JH> 4 >>> print [name for name in dir(wx) if
    JH> name.startswith('_c')] ['_controls', '_core']

OK, so I assume that you do have a wx._core.PyApp_MainLoop attribute,

    JH> Version info
    JH> peds-pc311:~> uname -a
    JH> Linux peds-pc311.bsd.uchicago.edu 2.4.21-15.0.2.ELsmp #1 SMP
    JH> Wed Jun 16 22:52:07 EDT 2004 i686 i686 i386 GNU/Linux

    JH> peds-pc311:~> python
    JH> Python 2.3.3 (#2, Apr 13 2004, 17:41:29) [GCC 3.3.3] on linux2
    JH> Type "help", "copyright", "credits" or "license" for more
    JH> information.
    >>>> import Tkinter Tkinter.TkVersion
    JH> 8.4000000000000004

I have the same exact Tkinter version but Python-2.3.4.

$ uname -a
Linux monster 2.4.20 #1 Mon Jan 6 19:56:44 IST 2003 i686 GNU/Linux
$ python
Python 2.3.4 (#2, Sep 24 2004, 08:39:09) 
[GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> Tkinter.TkVersion
>>> Tkinter.TclVersion

Anyway, it looks like Tkinter support does not work for everyone.
This is wierd.  Can you just check a few more things, please?

$ ldd /usr/lib/python2.3/lib-dynload/_tkinter.so 
        libBLT.2.4.so.8.4 => /usr/lib/libBLT.2.4.so.8.4 (0x4001f000)
        libtk8.4.so.0 => /usr/lib/libtk8.4.so.0 (0x4010a000)
        libtcl8.4.so.0 => /usr/lib/libtcl8.4.so.0 (0x401e3000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40292000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40359000)
        libc.so.6 => /lib/libc.so.6 (0x403aa000)
        libm.so.6 => /lib/libm.so.6 (0x404dd000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40500000)
        libdl.so.2 => /lib/libdl.so.2 (0x40515000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

As you can see, mine links to libpthread.  Similarly my tcl library
also appears to be compiled with --enable-threads and links to
libpthread.  Is your version of Tcl compiled with thread support?

$ ldd /usr/lib/libtcl8.4.so.0
        libdl.so.2 => /lib/libdl.so.2 (0x400c3000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400c6000)
        libm.so.6 => /lib/libm.so.6 (0x40118000)
        libc.so.6 => /lib/libc.so.6 (0x4013a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Maybe Tkinter support should be made an option.

Thanks for all the testing!


More information about the IPython-dev mailing list