Home | Mirror | Search

第 31 章 Pipe

目錄

1. stdin
2. forkpty
3. Popen

1. stdin

#!/usr/bin/python
#filename:demo.py

import sys

for line in sys.stdin:
    print line,


#ls -lh | python demo.py		
		
comments powered by Disqus