Eclipse Python¿ª·¢»·¾³
1£¬ÏÂÔØorg.python.pydev.feature-1.5.0.1251989166.zip http://sourceforge.net/projects/pydev/files/
2£¬°²×°²å¼þµ½eclipse
3£¬ÖØÆôeclipse
×¢Ò⣺ʹÓÃ1.5.6°æ±¾pydev²å¼þ£¬´´½¨python¹¤³Ì»á±¨´í£¬Ê¹ÓÃ1.5.0°æ±¾ÎÞ´ËÎÊÌâ¡£
Ïà¹ØÎĵµ£º
ÉèÖÃEmacsµÄHOME,¿ÉÒÔÔÚscratch bufferÖÐÊäÈ룺(insert (getenv "HOME"))²é¿´
ÏÂÔØpython-mode.el
ÓÃEmacs´ò¿ªpython-mode.elÈ»ºóM-x byte-compile-file±àÒëpython-mode.elΪelc
C-h v²é¿´load-path±äÁ¿
ÔÚHOME/.emacs.d/init.elÖÐÌí¼Ó(setq load-path (cons "D:\\emacs-23.1-bin-i386" load-path))
½«pyÎļþÓëpytho ......
PythonÖÐreactor,factory,protocolµÄѧϰ±Ê¼Ç
×îΪ¼òµ¥µÄÇé¿öÏ£¬³ýÁËÁ˽âÇåreactorµÄ¼òµ¥Ê¹Óã¬Ä㻹ҪÁ˽âProtocolºÍFactory¡£ËüÃÇ×îÖÕ¶¼»áÓÉreactorµÄÕìÌý½¨Á¢ºÍrunÀ´Í³Ò»µ÷¶ÈÆðÀ´¡£
½¨Á¢·þÎñÆ÷µÄµÚÒ»¸öÒª½â¾öµÄÎÊÌâ¾ÍÊÇ·þÎñÓëÍâ½çµÄ½»Á÷Ð ......
1.¸Ä±ä±¾ÎļþµÄÊôÐÔ
import
os
import
stat
os.chmod( filename, stat.S_IWRITE )
2.¸Ä±ä±¾Ä¿Â¼¼°Æä×ÓĿ¼ÊôÐÔ
import
os
os.system(r
'
attrib -r' + path +'\\*.* /s
'
)
3.½éÉܸıäÎļþÊôÐÔµÄdosÖ¸Áî
Attrib
ÏÔʾ¡¢ÉèÖûòɾ³ýÖ¸ÅɸøÎļþ»òĿ¼µÄÖ»¶Á¡¢´æµµ¡¢ÏµÍ³ÒÔ¼°Òþ²ØÊôÐÔ¡£Èç¹ûÔÚ²»º¬²ÎÊýµÄÇ ......
Ç°Á½ÌìÀí½âÁËunicode¡¢utf-8¡¢gb2312ÕâЩ±àÂëÖ®¼äµÄ¹ØϵÒԺ󣬽ñÌìÖÕÓÚŪÃ÷°×ÁËÔÚpythonÀïÃæµÄ±àÂëÎÊÌâ¡£ÎÒÃÇÔÚдpython½Å±¾Ê±Èç¹ûÓÐÖÐÎĵÄ×Ö·û´®£¬ÔÚÔËÐеÄʱºòÓпÉÄܻᱨ´íÒ²ÓпÉÄÜ»á³öÏÖÂÒÂë¡£Ò»°ã¼ÓÉÏ# -*- coding:utf-8 -*-¾Í²»»á±¨´íÁË£¬µ«ÊÇ»¹¿ÉÄÜÓÐÂÒÂëÎÊÌ⣬¶øÇÒͬÑùµÄ´úÂëÔÚ²»Í¬µÄ±à¼Æ÷ÖеóöµÄ½á¹û ......
import urllib
from HTMLParser import HTMLParser
class TitleParser(HTMLParser):
def __init__(self):
self.title = ''
self.divcontent = ''
self.readingtitle = 0
self.readingdiv = 0
HTMLParser.__init__(self)
def handle_starttag(self, tag, attrs):
......