Invoke Python procedure from TCL
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Invoke Python procedure from TCL

From: ab <koppalaby@gmail.com>
Date: Wed May 25 2005 - 12:24:43 CEST

Hi,

I have an UI written in Tcl/Tk and there is a ui_feed.py Python
file that has some procedures to do some processing.
I need to invoke one of these procedure in the Tcl code.

Like:

******************ui.tcl*********************
proc create_widgets{} {
.
.
.
var1 = ui_commands ($line1, $line2)
# Here ui_commands is a procedure in the python file ui_feed.py
# that prints the processed data taking $line1 & $line2 as input
.
.
# $var1 will have the data that is printed from the ui_commands.
.
.
.
*************************** END ************

How can I achieve this in Tcl?

Thanks and regards,
AB
Received on Thu Sep 29 14:18:55 2005