Python¿âÏê½âÖ®ÍøÂç(1)
¸Õ¸ÕдÍêPythonǶÈ벿·ÖµÄ¼òµ¥Àý×Ó£¨²î²»¶à¹»ÏÖÔÚÓõÄÀ²~£©£¬½Ó×Å¿´µãʵ¼ÊµÄ¶«Î÷£¬Èç¹ûûÓÐÕâЩӦÓõϰ£¬Ç°ÃæµÄǶÈëҲûÓÐʲôÒâÒ塣ǶÈëµÄÆäËû²¿·ÖÒÔºóÓöµ½ÔÙд£¬²»±ØÒ»ÏÂ×Ó°ÑÄÇЩº¯Êý¶¼Åª¶®£¬ÊǰÉ~
OK£¬À´¿´Python¿âÖÐÎÒÈÏΪ×îºÃÍæµÄÒ»²¿·Ö£¬Ò²¾ÍÊÇPython¶ÔÍøÒ³µÄ²Ù×÷¡£
ÕâÆª¼òµ¥ËµÏÂÈçºÎͨ¹ýÍøÖ·ÏÂÔØÍøÒ³£¬Ç°ÌᵱȻÊÇÒªÄÜÉÏÍø¡£
ÎÒÕâÀïÊǽ«ÍøÒ×µÄÍøÒ³ÏÂÏÂÀ´±£´æÔÚtest.htmlÎļþÖС£
ÏÂÔØÍøÒ³Ö»ÐèÒª2ÐдúÂ룺
#×¢ÒâÏÖÔÚpython3.1°æ±¾ÓëÒÔǰÓÐÁ˺ܴó±ä»¯£¬¹ýÈ¥´úÂëºÃ¶à²»ÄÜÓã¬ÐèÒªÉÔ΢ÐÞ¸ÄÏÂŶ
import urllib.request
urllib.request.urlretrieve('http://www.163.com','test.html') #ÄãÃÇÓÃË«ÒýºÅÊÔÏ£¬ÎÒÕâÔõôÓÐÎÊÌ⣿µ¥ÒýºÅºÍË«ÒýºÅÔÚÕâÀïÓÐÇø±ðô£¿
ºÇºÇ£¬²»ÊǾõµÃÌ«¼òµ¥Á˵㣬µ«ÎÒ»¹ÊDZȽÏϲ»¶ÏÂÃæ´úÂë¶àµãµÄʵÏÖ·½Ê½£¨ÎÒûÓÐÌí¼ÓÒì³££¬Èç¹ûÊÇÉÔ΢ÕýʽµãµÄ±àÂ룬ÇëÌíЩ´¦ÀíÒì³£µÄ´úÂë°É£©£º
import urllib
import urllib.request
url=urllib.request.urlopen("http://www.163.com")
file=open("test.html",'wb') #it's 'wb',not 'w'
while(1):
line=url.readline()
if len(line)==0:
break
file.write(line)
ºÇºÇ£¬ÏÖÔÚÊDz»ÊǸоõÏÂÔØÍøÒ³ÕæÃ»Òâ˼~
OK£¬ÏÂÆªËµÏÂÈçºÎ½âÎöÎÒÃÇÏÂÔØÏÂÀ´µÄÍøÒ³£¬ÕâÑùÏÂÏÂÀ´µÄÍøÒ³²ÅÓÐÓÃÂï~ ^_^
Ïà¹ØÎĵµ£º
Ê×ÏÈÊÇÏÂÔØpython3£¬ÏÖÔÚµÄ×î¸ß°æ±¾ÊÇ3.1.1
for linux¡£
ÎҵķÅÖ÷¾¶ÊÇ/home/pythonÏ·ÅÖÃPython-3.1.1.tgz,Ö´ÐÐÒÔÏÂϵÁвÙ×÷£º
1.½âѹ£ºtar zxvf Python-3.1.1.tgz----Éú³É½âѹ°üPython-3.1.1
2.ת»»µ½Python-3.1.1·¾¶Ï£¬Ö´ÐÐ./configure
3.make
4.make install
ÔÚrehl5ÖÐÒѾĬÈϰ²×°ÁËpython2.4,ËùÒÔÒª×öÈçÏ ......
Python Firewall Win32 (pyfw-win32)
pyfw-win32ÊÇÒ»¸ö¿ÉÓÃPython½Å±¾¿ª·¢Êý¾Ý°ü¹ýÂË(·À»ðǽ)µÄÄ£¿é¡£µ×²ãʹÓÃCÓïÑÔ±àдµÄNDISÖмä²ãÇý¶¯(NDIS IMD)Ìṩ֧³Ö£¬ÉϲãÌṩPython¿ª·¢½Ó¿Ú¡£¿ÉÓÃPython½Å±¾´¦ÀíËùÓÐÂß¼ÎÊÌ⣬¶ø²»±Ø¹ØÐĵײãʵÏÖ£¬´ïµ½¿ìËÙ¡¢Áé»î¿ª·¢µÄÄ¿µÄ¡£
Google ÏîÄ¿Íйܣº
http://code.google.com/p/py ......
ZoundryDocument
Python skin is known for its color variations and for its elasticity; it is
the warmest leather of the season and ideal for the manufacture of many luxury
goods. Sometimes natural patterns can be hidden when they're done in black, but
the finish here has a bit of a shine to it ......
´úÂëÖвÉÓÃÁËÈý²½ÊµÏÖËãÊõ±í´ïʽµÄ½âÎö:
1. ½«ËãÊõ±í´ïʽ(×Ö·û´®)ת»»³ÉÒ»¸öÁбíparseElement·½·¨
2. ½«Áбí±íʾµÄËãÊõ±í´ïʽת»»³Éºó׺±í´ïʽchangeToSuffix
3. ¼ÆËãºó׺±í´ïʽµÄ½á¹û
ÕâÀïÎÒÊÇΪÁË·½±ã, ¾ÍдÁ˸öparseElement, ²»ÏëÄÇ·½·¨Ð´µ½ºóÃæÈ´°Ñ×Ô¼ºÈÆ×¡ÁË, ¿ÉÒÔÏëÏóÒ»¸ö´ø×ÔÔö, λ, Âß¼, ËãÊõµÄ±í´ïʽµÄÊýÖµÌá ......
¹¤ÓûÉÆÆäʱØÏÈÀûÆäÆ÷£¡
¿ª·¢PythonÓÃʲô¹¤¾ßºÃÄØ£¿Æäʵ¸ÕѧPythonµÄ»°£¬Ê¹ÓÃIDLE¾Í¹»ÁË£¬ËäÈ»µ÷ÊÔ²»ÊÇÌØ±ð·½±ã£¬µ«ÊǶÔÓÚ³õѧÒѾ¹»ÁË£¬¿ÉÒÔʹÓÃPrint½øÐмòµ¥µÄµ÷ÊÔ£¬²»½¨ÒéʹÓüÇʱ¾½øÐпª·¢£¬²»ÖªµÀµÄÈÏΪÄãºÜÅ££¬ÖªµÀµÄ……ÕâÊÇ×Ô¼º¸ø×Ô¼ºÕÒ×ïÊÜ£¬ÓÃEditplusÃ²Ë ......