I have a tcl driver script which in turn calls several other programs. I want to invoke a python script from my tcl script. lets say this is my python script "1.py"
#!/usr/bin/python2.4
import os
import sys
try:
fi = open('sample_+_file', 'w')
except IOError:
print 'Can\'t open file for writing.'
sys.exit(0)
and tcl script is "1.tcl"
#! /usr/bin/tclsh
proc call_python {} {
exec python 1.py
}
This doesn't give any error but at the same time it does not perform the operations present in the python script.
What should replace the code fragment "exec python 1.py" in 1.tcl to invoke the python script? Can a python script be invoked using exec?
Thanks in advance!!