Posted to tcl by egavilan at Tue Apr 15 14:24:52 GMT 2008view pretty

#!/usr/bin/wish
set pipe2 [open "|./python_pipe_frm_TK.py" r+]
fconfigure $pipe2 -buffering line
puts $pipe2 "Hello world"
set line [gets $pipe2 ]
set lb2 [label .deptLabel2 -text $line]
pack $lb2 -side left



#!/usr/bin/python
import os
import sys
text = fin.readline().strip()
print text
sys.stdout.flush()