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)

GAE sdk 1.1.9 problem with django helper(appengine_django)

2009-04-16 03:55:35   Category:Python   Comments:0   Reference:1   Tags:

The django helper could not find the app.yaml when I updated the gae sdk to 1.1.9 and djano version is 0.96. We need add the content into the app.yaml file to enable uploadding the app.yaml into the development envirment :

skip_files:
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*

Then django/core/management could not find the django.get_version function. We need modify the __init__.py in django directory:

VERSION = (0, 96.2, None)
def get_version():
    return Version


It works fine.

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

A example code of multithread communication

2008-10-31 01:59:52   Category:Python   Comments:0   Reference:0   Tags:

import socket
from threading import  *
HOST=''
PORT=1777

class ServThread(Thread):
  def run(self):
    servSocket=socket.socket()
    servSocket.bind((HOST,PORT))
    servSocket.listen(5)
    while 1:
      conn,addr=servSocket.accept()
      data=conn.recv(1024)
      print 'Address is: %s \n' % repr(addr)
      print 'Server eceived data is: %s \n' % data
      conn.send('server send data')
      conn.close()
      break
    servSocket.close()
   
   
class ClientThread(Thread):
  def run(self):
      clientSocket=socket.socket()
      clientSocket.connect(('localhost',PORT))
      clientSocket.send('client send data')
      data=clientSocket.recv(1024)
      print 'Client received data is: %s \n' % data
      clientSocket.close()
     
def runtest():
  servThread=ServThread()
  servThread.start()
 
  clientThread=ClientThread()
  clientThread.start()
 
  servThread.join()
  clientThread.join()

if __name__=='__main__':
  runtest()
     

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

2008 Open Source CMS Award Best Other Open Source CMS Finalists

2008-09-24 00:47:54   Category:Python   Comments:0   Reference:0   Tags:

The following five Open Source Content Management Systems, listed in alphabetical order, made it through to the final of the Best Other Open Source CMS in the 2008 Open Source CMS Award. To read more about the CMS, and view demos, click on the CMS below(from http://www.packtpub.com/):

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

Django request's GET and POST

2008-09-12 14:21:08   Category:Python   Comments:0   Reference:0   Tags: Django , post , get

It is a similar dictionary, but it's get method can throw a KeyError exception.

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

实现简单的命令行调用

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/

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/