作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我想做这样的事情:
find -name "foo*" | python main.py
并访问查找程序找到的所有文件。我如何在 Python 中访问它?
最佳答案
import sys
for line in sys.stdin:
print line
关于python - 如何在 python 中通过 shell 管道接收参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6106437/
我是一名优秀的程序员,十分优秀!