I want to execute a pyz
file over SSH in this way:
cat test.pyz | ssh -M user@somehost python
This is the current output:
File "<stdin>", line 1
PKimport sys
^
SyntaxError: invalid syntax
After some digging, I discovered that if I try: cat test.pyz | python
OR python < test.pyz
on my terminal I get the same error message.
If I try this: python test.pyz
Python successfully executes the bundle. Sadly, this is not an option for me.
Any ideas why and how to successfully run my pyz bundle (in the cat | python fashion)?
ps. The pyz
file prints "Hello World" --that's it