[Tutor] Executing Python from TCL

Karim karim.liateni at free.fr
Thu Aug 12 06:38:52 CEST 2010

Hello Alan,

I want to take benefit of xml.etree.ElementTree and 
xml.etree.CElementTree, which are very
good and do most of the job for me (create automatically database with 
lists and dictionary for me).
My point is to do a same API used by team developing with Python and 
another team developing in TCL. I want to facilitate the reuse and make 
everybody happy (no war between the 2 languages supporters) though for 
me Python is largely superior.

Anyway, you're right I found what I needed at:


This is the open source Elmer distribution.


On 08/12/2010 02:13 AM, Alan Gauld wrote:
> "Karim" <karim.liateni at free.fr> wrote
>> I want to know if there are modules or whatever to execute
>> python functions inside TCL.
> Not that I know of, unless Google tells you something different.
> You can of course call Python programs from Tcl and vice-versa. If you 
> use the Java versions of both you might succeed.
> Or you could wrap your parser as a separate server process and expose 
> it as a Web service or XML RPC...
> But given the wealth of xml parsers available for Tcl I'm surprised 
> that they need yours...
>> These functions should returns python lists as TCL lists and
>> Python dictionary as TCL Hash tables.
> You could probably do some C level integration using Boost or SWIG or 
> somesuch but I doubt the benefit would be worth it.
> HTH,

More information about the Tutor mailing list