Reputation: 259
I am trying to execute python from tcl script but i have the message error "couldn't execute "python": no such file or directory"
This is my code: test.py
print('hello')
exec.tcl
set out [exec python test.py]
puts $out
and in Windows PowerShell i use this command:
tclsh exec.tcl
Could you please help me fix this error?
Upvotes: 0
Views: 3989
Reputation: 1691
Depending on your Python's version, it may use py as command. You should try using 'py' instead of 'python'.
More info: Python Launcher for Windows (Python Docs)
Upvotes: 4