Embedded Tcl for Python

Paul Duffin pduffin at mailserver.hursley.ibm.com
Mon Jun 28 14:49:18 CEST 1999


Robin Becker wrote:
> 
> In article <3760F0A1.1DDC at mailserver.hursley.ibm.com>, Paul Duffin
> <pduffin at mailserver.hursley.ibm.com> writes
> >Michael P. Reilly wrote:
> >>
> >> A few weeks ago, someone asked if there was a Tcl module for Python.
> >> People responded (including myself) that Tkinter uses a Tcl/Tk
> >> interpreter, but you couldn't get rid of the annoying window.
> >>
> >> I've since written an extension ("pytcl") that creates Tcl interpreter
> >> objects.  As part of that, I have also rewritten _tkinter to use these
> >> new objects.
> >>
> >> I've had a short discussion with Guido and he's interested in the
> >> idea.  Now I need some alpha testers; I only have access to UNIX boxes,
> >> and very few types at that.
> >>
> >> The _tkinter module has the same functionality as before, including the
> >> same threading issues.  I've include Deiter's Tcl/Tk8.1 patch but have
> >> not had the opportunity to test that yet (right not it is just do-no-
> >> damage).
> >>
> >> Contact me at arcege at shore.net if you are interested in helping me test
> >> these modules.
> >>
> >
> >I was interested in doing something similar in Tcl (e.g. creating a
> >python interpreter object) and I was wondering if someone could give
> >me some pointers as to how to go about doing it.
> >
> Paul I created a socket linked python interpreter and have used it with
> reasonable success from Tcl. Latest code is at
> 
> http://www.jessikat.demon.co.uk in the file pyserver.zip
> 
> this may not be as efficient as havin the in core thing, but gets round
> the problem of threading model problems etc.

Thanks Robin, I will take a look at that, have you got any information
on the threading model problems as I have not yet looked into Python
threading. I must admit I was amazed that Python does not support
being built as a shared library and can think of no practical reason why
not as Python does support dynamically loadable extensions.

Have any Pythoneers out there done this as it is very useful ?
If you have any questions as to how useful it is you just need to look
at Tkinter which could not be dynamically loadable (it is isn't it)
without Tcl and Tk being dynamically loadable.


-- 
Paul Duffin
DT/6000 Development	Email: pduffin at hursley.ibm.com
IBM UK Laboratories Ltd., Hursley Park nr. Winchester
Internal: 7-246880	International: +44 1962-816880




More information about the Python-list mailing list