2009-09-17 13:33:45
Category:source code
Comments:0
Reference:1
Tags:
源代码
,
python
本网站的代码已经提交到google的版本管理系统中了,大家可以从http://code.google.com/p/jumang-blog/下载。具体的使用说明我会找时间写出来,现在简单说明一下,大家使用的时候必须修改的地方有两个:
- config.py中的
currentHome=u'http://jum.appspot.com/'
siteHome=u'http://jum.appspot.com/'
resourceHome=u'http://jumres.appspot.com/'
albumHome=u'http://jumpics.appspot.com/'
privateHome=u'http://jumangs.appspot.com/'
- app.yaml中的application: jum
TrackBack URL:http://jum.appspot.com/feeds/trackBack/63642/
2008-09-12 09:09:35
Category:Python
Comments:0
Reference:0
Tags:
python
,
ftp
def run():
ftpObj=ftplib.FTP('10.10.xx.xxx','aaa','aaa')
print ftpObj.cwd('user_projects/domains/web/myserver/')
files=FtpFiles()
print ftpObj.retrlines('nlst access.log',files.analyFile)
ftpObj.retrbinary('RETR access.log',open('access.log','wb').write)
print ftpObj.quit()
class FtpFiles:
files=[]
def analyFile(self,aLine):
##do something
TrackBack URL:http://jum.appspot.com/feeds/trackBack/1642/
2008-09-12 09:11:22
Category:Python
Comments:0
Reference:0
Tags:
popen2
,
python
fin,fout=os.popen2('dir')
for aline in fout.readlines():
print aline
fout.close()
很简单吧,可以调用一些批处理完成工作了,hoho。
TrackBack URL:http://jum.appspot.com/feeds/trackBack/1442/
Recent Comments:
qsJpYHO:Hi! MyzbhyCz
huyapD:Hi! IFEMzLa
Pharme908:Very nice site!
jumang:忘记说了,他发送这个短信时使用电话号码是135233743006。
Pharmd560:Very nice site!