这个功能如果写成shell脚本是这样,求python实现
#!/bin/sh echo "Running shell script" while read LINE; do echo ${LINE} done
python里有个内置函数:input,在python的2.x版本里叫raw_input。
#!/usr/bin/python #coding=utf-8 print "Running python script" s = raw_input(">") print s