Cygwin-tcsh-无法运行Python脚本-找不到命令

我正在使用Cygwin的tcsh外壳。我安装了Cygwin是因为我有一个教授在Linux / Mac中给出了很多指令,并且它们都使用csh命令。

当我键入此内容时:

cat some_file.txt | some_python_script.py

我明白了:

some_python_script.py: Command not found.

其中some_python_script.py是应在stdin上运行的脚本。如果我在linux / mac环境中,如何使自己的Python脚本在Cygwin中工作?

谢谢!

lcmoba72 回答:Cygwin-tcsh-无法运行Python脚本-找不到命令

您要它将some_file.txt的内容传送到some_python_script.py

期望在那里有一个命令。通常,您将运行这样的python脚本

python some_python_script.py

如果要将some_file.txt的内容通过管道传输到其中,则可以这样做

cat some_file.txt | python some_python_script.py
本文链接:https://www.f2er.com/3061049.html

大家都在问