如何使用tcl文件重定向power shell输出?

如何使用tcl文件重定向power shell输出?,tcl,exec,stdout,Tcl,Exec,Stdout,我试图从tcl文件中调用powershell文件(test.ps1)。到目前为止,我尝试的是: 调用单机版(Windows PC)时,power shell文件工作正常,而power shell在打开的power shell窗口中显示不同的输出消息 现在,我想通过一个tcl文件(来自Quartus应用程序)调用相同的powershell文件(test.ps1)。当我简单地调用: exec "D:/temp/test.ps1" 但不起作用的是,powershell文件中没有显示任何输出,并且po

我试图从tcl文件中调用powershell文件(test.ps1)。到目前为止,我尝试的是:

调用单机版(Windows PC)时,power shell文件工作正常,而power shell在打开的power shell窗口中显示不同的输出消息

现在,我想通过一个tcl文件(来自Quartus应用程序)调用相同的powershell文件(test.ps1)。当我简单地调用:

exec "D:/temp/test.ps1"
但不起作用的是,powershell文件中没有显示任何输出,并且powershell在后台运行时应用程序(Quartus)冻结。当ps1文件终止时,我会再次在tcl文件外壳中看到所有输出。我尝试使用以下tcl file命令来显示输出消息:

exec "D:/temp/test.ps1" >@stdout &
我得到的错误是: 问题:
你知道我为什么会出现这个错误,以及如何避免它以查看powershell文件的输出吗?

tcl程序是如何调用的?当你说“从windows资源管理器工作”和“查看所有输出”时,你的确切意思是什么?你有powershell窗口吗?当从Tcl执行时,是否会出现这种情况?您可以尝试显式添加
@glennjackman添加我猜您是从wish或tkcon运行此功能?@DonalFellows否从Quartus
Error:channel "stdin" wasn't opened for writing while executing