I have a tcl script driver, which in turn calls several other programs. I want to call a python script from my tcl script. let's 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 - "1.tcl"
#! /usr/bin/tclsh proc call_python {} { exec python 1.py }
This does not give any error, but at the same time does not perform the operations present in the python script.
What should replace the exec python 1.py code snippet in 1.tcl to call the python script? Is it possible to call a python script using exec?
Thanks in advance!
source share