My Python Script on Freebsd 9.2 is throwing error, while it worked fine on Freebsd8.2.
test.py
import os
import subprocess
tclsh = '/usr/local/bin/tclsh'
process = subprocess.Popen([tclsh, 'run_tests.tcl'] )
test.tcl
proc sleep {N} {
after [expr {int($N * 1000)}]
}
puts "--- Initializing----"
Throws the error
File "run_tests.tcl", line 1
proc sleep {N} {
^
SyntaxError: invalid syntax
So if I change the python script
-tclsh1 = '/usr/local/bin/tclsh'
+tclsh1 = '/usr/local/bin/tclsh8.5'
It works fine on Freebsd9.2.
However, if I execute command on command line it works fine too.
/usr/local/bin/tclsh test.tcl
Error is thrown while running the command via python script on Freebsd 9.2 with tclsh1 = '/usr/local/bin/tclsh'
Does anyone know whats wrong here?