python simple function
1. Read a file and print contect
import os
outdirs = os.popen("cat outdirs.list").read() print "% s" % outdirs
2. Read a file and print line by line
f = open("outdirs.list","r")
for x in f:
print(x)
f.close()
好的心态+正确的方法
浙公网安备 33010602011771号