[Python]開啟及寫入檔案

# -*- coding:utf-8 -*-


Str = "Hello this is my Python\n"
f = file("T:\\abc.txt","w")
f.write(Str)
f.close()

f = file("T:\\abc.txt","r")
print f.readline()#readline為讀取一行,read為讀取整份文件



[Python]時間函數

[Python]Gmail SMTP example