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/
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-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/
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/
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/
Recent Comments:
qsJpYHO:Hi! MyzbhyCz
huyapD:Hi! IFEMzLa
Pharme908:Very nice site!
jumang:忘记说了,他发送这个短信时使用电话号码是135233743006。
Pharmd560:Very nice site!