以下のスクリプトで python を介して TCL を実行すると、ユーザー定義のパッケージを必要とする TCL スクリプトがあります。
import subprocess
p = subprocess.Popen(
"tclsh tcltest.tcl",
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
print stdout
print stderr
次のエラーを返します。
can't find package __teapot__
while executing
"package require __teapot__"
TCL は tclsh 環境で動作します。Python がパッケージを認識しないという私のセットアップで何かが間違っていると思います!