[英]Pipe curl output as a python file to python
I'm trying to run python on a curl output without actually downloading the file onto the system. 我正在尝试在curl输出上运行python而不实际将文件下载到系统上。
So instead of doing the following: 因此,不要执行以下操作:
wget 1.2.3.4/mypythonfile.py
python mypythonfile.py
I'd like to be able to do something like python | (curl 1.2.3.4/mypythonfile.py)
我希望能够做类似
python | (curl 1.2.3.4/mypythonfile.py)
python | (curl 1.2.3.4/mypythonfile.py)
. python | (curl 1.2.3.4/mypythonfile.py)
。
The above command doesn't work by the way. 上面的命令不起作用。
How would I do that? 我该怎么做?
Instead of python | (curl 1.2.3.4/mypythonfile.py)
代替
python | (curl 1.2.3.4/mypythonfile.py)
python | (curl 1.2.3.4/mypythonfile.py)
, do this python | (curl 1.2.3.4/mypythonfile.py)
,执行此操作
curl 1.2.3.4/mypythonfile.py | python -
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.