Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Pythonµ¼³öQQ¿Õ¼äµÄÈÕÖ¾

ÓÃPythonµ¼³öQQ¿Õ¼äµÄÈÕÖ¾µ½WordPress
ÎÄÕÂÀ´Ô´£ºhttp://www.keakon.cn/bbs/thread-964-1-1.html·½·¨ºÜ¼òµ¥£¬ÕÒ³öÈÕÖ¾µÄµØÖ·£¬ÔÙ±éÀúÁгöÈÕÖ¾µÄÄÚÈÝ¡£
ÒòΪµ¥´¿µ¼³öûÓ㬻¹µÃת»»³ÉÆäËû¸ñʽ£¬ËùÒÔÎÒ±£´æµ½Ò»¸öÁбíÀÿƪÈÕÖ¾¶¼¶ÔÓ¦ÆäÖеÄÒ»¸ö×ÖµäÔªËØ£¬×ÖµäµÄÊôÐÔ¶¼ÓÃunicode±àÂë¡£
È»ºódump³öÀ´£¬¿ÉÒÔ·½±ãÒÔºóÓÃPython½øÐÐÔÙ´¦Àí£¨Ä¬ÈÏΪblogs.txtÎļþ£©¡£
²¢×ª»»³ÉÁËWordPressÓõĸñʽ£¨Ä¬ÈÏΪqzone.xmlÎļþ£©¡£
±¾ÏëÓöàÏß³ÌÀ´ÏÂÔØ£¬µ«Ëƺõû±ØÒª£¬ÒòΪֻ»¨ÁË80Ã룬ÎÒµÄ149ƪÈÕÖ¾¾ÍÈ«²¿ÏÂÔØÏÂÀ´ÁË¡£
Èç¹û¿Õ¼äÓÐÉèÖ÷ÃÎÊȨÏ޵Ļ°£¬¿ÉÒÔÓÃClientCookieÕâ¸öÄ£¿éÀ´´¦Àí£¬°Ñ×¢Ê͸ÄϾÍÐÐÁË¡£
´ËÍ⣬Õâ¸öÒ²¿ÉÒÔµÁÈ¡±ðÈ˵ÄÈÕÖ¾£¬µ«Ô¸²»ÒªÀÄÓÃ…
×îºó£¬ÆÀÂÛÎÒûÏÂÔØ£¬ÒòΪWordPressºÃÏñ²»Äܵ¼ÈëÆÀÂÛ¡£
´úÂëÈçÏ£º
# -*- coding: gbk -*-
from __future__ import with_statement
import codecs
from datetime import datetime
from datetime import timedelta
from os import linesep
import cPickle
#import ClientCookie
from urllib2 import urlopen
mainUrl = 'http://%s.qzone.qq.com/'
listUrl = 'http://b.qzone.qq.com/cgi-bin/blognew/blog_output_toppage?uin=%(qq)s&vuin=0&property=GoRE&getall=1&imgdm=imgcache.qq.com&bdm=b.qzone.qq.com&cate=&numperpage=100&sorttype=0&arch=0&pos=%(pos)d&direct=1'
blogUrl = 'http://qzone.qq.com/blog/%(qq)s-%(blogid)s'
GMT_FORMAT = '%a, %d %b %Y %H:%M:%S +0800'
HEADER = u'''<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
  xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
  <title>%(author)sµÄQQ¿Õ¼ä</title>
  <description>%(description)s</description>
  <pubDate>%(time)s</pubDate>
  <generator>keakonµÄQQ¿Õ¼äµ¼³ö³ÌÐò</genera


Ïà¹ØÎĵµ£º

python ¶ÁдExcelÎļþ

http://sourceforge.net/projects/pyexcelerator/
12ÔÂ2ÈÕ
python ¶ÁдExcelÎļþ£¨×ªÌû limodou£©
http://www.lexicon.net/sjmachin/xlrd.htm
Õâ¸ö°üÊÇÓÃÀ´¶ÁExcelÎļþµÄ
ÔÚ·¢ÏÖ xlrd Ö®ºó²»¾Ã¾Í·¢ÏÖÁË pyExcelerator
£¬ËüÓë xlrd ²»Í¬£¬ËüÖ÷ÒªÊÇÓÃÀ´Ð´ Excel Îļþ£¬µ±È»¶ÁÒ²ÊÇûÓÐÎÊÌâµÄ¡£ÏÂÃæ¾ÍËüµÄʹÓüòµ¥µØ½éÉ ......

Python×°ÊÎÆ÷

Ò»¿ÅÓï·¨ÌÇ——×°ÊÎÆ÷
ÀíÂÛ²»È¥¹Ü£¬Ö»¹ÜÄÜ°ìÊ£º
1.  ÎÒÒªÈÃÒ»¸öº¯ÊýÔÚÖ´ÐеÄʱºò£¬È¥×öһЩÊÂÇ飬±ÈÈ磬ÎÒÒª¿´¿´ÕâЩº¯ÊýÊDz»ÊÇÓÐdocstring£¬½«Õâ¸ö¹¦ÄÜÄóöÀ´£¬¶¨ÒåÒ»¸ö×°ÊÎÆ÷£º
def showmedoc(func):
     if func.__doc__:
        & ......

vim µÄpython Óï·¨¸ßÁÁ

vimÖ§³Ö´ó²¿·ÖÎļþ¸ñʽµÄÓï·¨¸ßÁÁ£¬¶øÇÒ¿ÉÒÔ×Ô¶¨Òå¡£²»¹ýȱʡµÄpythonÓï·¨¸ßÁÁ¸Ð¾õÌ«ÉÙ£¬ÐÞ¸Äһϡ£
1.ÐÞ¸ÄÓï·¨¸ßÁÁÎļþ
vim/vim72/syntax/python.vim
½«"    let python_highlight_all = 1
Ç°ÃæµÄÒýºÅÈ¥µô£¬¿ÉÖ§³ÖÄÚÖú¯Êý£¬Êý×Ö£¬¿Õ¸ñ£¬Òì³£µÄÓï·¨¸ßÁÁ¡£
2. ½«self¼Ó½ø
syn keyword pythonBuiltin&n ......

PythonÖÐÎÄÎÊÌâ

Ô­ÎÄÁ´½Ó
      Ôø¾­ÔÚÉîÈëdz³öjavaÖÐÎÄÎÊÌâ
ϵ
ÁÐÖÐÑо¿¹ýjavaµÄÖÐÎÄÎÊÌ⣬ÏÖÔÚÖÐÎÄÎÊÌâÒѾ­²»ÔÙî¿°íÎÒÔÚjavaÊÀ½çÖÐÂþÓεĽŲ½ÁË¡£×î½ü£¬¶ÔPython²úÉúÁËŨºñµÄÐËȤ£¬Ë­ÖªµÀ¸úÖÐÎÄÎÊÌâÕâ¸ö
ÀÏÅóÓÑÓÖÒ»´Î²»ÆÚ¶øÓö¡£¿´À´£¬ÔÚ´úÂëÊÀ½çÖУ¬ÖÐÎÄÎÊÌâ»áÔںܳ¤Ò»¶Îʱ¼äÀï¸úÎÒÃÇÐÎÓ°²»Àë¡£ÕâÒ²Äѹ֣¬Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ