python学习

Python 改变当前工作目录

http://blog.csdn.net/flying881114/article/details/6224266

 os.chdir("目标目录")。注意之前要import os


Python多线程学习

http://www.cnblogs.com/tqsummer/archive/2011/01/25/1944771.html


python shell

http://www.cnblogs.com/lovemo1314/archive/2010/11/08/1871781.html



import csv

reader = csv.reader(file('your.csv', 'rb'))
for line in reader:
    print line

 

writer(csvfile[, dialect='excel'][, fmtparam])

参数表(略: 同reader, 见上)

例子:

import csv

writer = csv.writer(file('your.csv', 'wb'))
writer.writerow(['Column1', 'Column2', 'Column3'])
lines = [range(3) for i in range(5)]
for line in lines:
    writer.writerow(line)


import csv


writer = csv.writer(file('your.csv','wb'), delimiter=' ')
writer.writerow(['Column1', 'Column2', 'Column3'])
lines = [range(3) for i in range(5)]
for line in lines:
    writer.writerow(line)


你可能感兴趣的:(python学习)