Messages

melissa:2YJaA7 http://google.com sdf http://google.com http://google.com sdfgwq

melissa:YhmI00 http://google.com sdf http://google.com http://google.com sdfgwq

melissa:N5ppGb http://google.com sdf http://google.com http://google.com sdfgwq

Oyuduaod:comment6

Fgmaebwo:comment2

User Name:

Content:

Tags:

gae(3)    css(3)    日志(3)    python(3)    svn(3)    weblogic(2)    ie(2)    ftp(2)    c++(2)    原则(2)    bugfree(2)    jira(2)    turbolinux(2)    tinyMCE(1)    南京(1)    static_dir(1)    django(1)   

 

 Categories:   All    管理 (27)    GAE (7)    杂谈 (14)    网站 (7)    Python (6)    Java (8)    c++ (1)    生活 (8)    我的儿子 (4)    Database (4)    骗局 (2)    source code (1)

本网站的代码共享

2009-09-17 13:33:45   Category:source code   Comments:0   Reference:1   Tags: 源代码 , python

本网站的代码已经提交到google的版本管理系统中了,大家可以从http://code.google.com/p/jumang-blog/下载。具体的使用说明我会找时间写出来,现在简单说明一下,大家使用的时候必须修改的地方有两个:

  1. 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/'
  2. app.yaml中的application: jum

TrackBack URL:http://jum.appspot.com/feeds/trackBack/63642/

download ftp file in python

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/