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

ѧϰpython½Å±¾ÓïÑԱʼǣ¨1£©

ptyhonºËÐıà³ÌµÚÈý°æµÄ×Ôѧ£¬Ö÷Ҫѧϰ±Ê¼Ç·¢Ï£º
µÚÒ»Õ£ºÊ¹ÓÃÈëÃÅ
ÈËÃÇΪʲôʹÓÃPYTHONÓïÑÔ£º
1¡¢Èí¼þÖÊÁ¿£»
2¡¢¿ª·¢ÕßЧÂÊ£»
3¡¢³ÌÐòµÄ¿ÉÒÆÖ²ÐÔ£»
4¡¢×é¼þ¼¯³É£»
5¡¢ÏíÊÜÀÖȤ£»
PYTHONÓïÑÔµÄȱµã£¬¾ÍÊÇËÙ¶ÈÂý¡£
ʹÓÃPYTHON¿ÉÒÔ×öЩʲô£º
1¡¢ÏµÍ³±à³Ì£»
2¡¢Óû§Í¼Ðνӿڣ»
3¡¢INTERNET½Å±¾£»
4¡¢×é¼þ¼¯³É£»
5¡¢Êý¾Ý¿â±à³Ì£»
6¡¢¿ìËÙÔ­ÐÍ
7¡¢Êý¾ÝÖµ¼ÆËãºÍ¿Æѧ¼ÆËã±à³Ì£»
8¡¢ÓÎÏ·¡¢Í¼ÐΡ¢È˹¤ÖÇÄÜ¡¢XML¡¢»úÆ÷È˵ȡ£
PYTHONÔÚÄÄЩ¼¼ÊõÉϵÄÓÅÊÆ£º
1¡¢ÃæÏò¶ÔÏó£»
2¡¢Ãâ·Ñ£»
3¡¢¿ÉÒÆÖ²ÐÔ£»
4¡¢¹¦ÄÜÇ¿´ó£»
5¡¢¿É»ìºÏ±à³Ì£»
6¡¢Ê¹Óüòµ¥£»
7¡¢¼òµ¥Ò×ѧ£»
µÚ¶þÕ ÈçºÎÔËÐгÌÐò
PYTHONÆäʵÓëJAVAÒ»Ñù£¬ÊDzÉÈ¡±àÒë³É×Ö½ÚÂëºó£¬ÔÙ½øÐÐÔËÐУ¬ÔÚÔËÐÐËÙ¶ÈÉÏ´¦ÓÚCºÍJAVAÖ®¼ä£¬ÕýÒòΪÊÇʹÓÃ×Ö½ÚÂ룬ËùÒÔ¿ÉÒÆÖ²ÐÔ½ÏÇ¿¡£
PYTHONʵÏÖÔÚÌæ´úÕߣº
1¡¢CYTHONÊÇԭʼµÄ¡¢±ê×¼µÄÌæ´úÕß¡£
2¡¢JYTHONÆäÄ¿µÄÊÇΪÁËÓëJAVA±à³ÌÓïÑÔ¼¯³É¡£
3¡¢IRONPTYON£¬ËûµÄÉè¼ÆÄ¿µÄÊÇÈÃPYTHON³ÌÐò¿ÉÒÔÓëWINDOWSƽ̨ÉÏ¡£NET¿ò¼ÝÒÔ¼°ÓëÖ®¶ÔÓ¦µÄLINUXµÄ¿ªÔ´µÄMONO±àд³ÉÓ¦ÓÃÏ༯³É¡£
4¡¢Ö´ÐÐÓÅ»¯¹¤¾ß£¬PSYCOʵʱ±àÒëÆ÷£¬¿ÉÒÔÈóÌÐòÔËÐÐËٶȼӿ졣
µÚÈýÕ ÈçºÎÔËÐгÌÐò
1¡¢½»»¥Ê½Ä£Ê½Ï±àд´úÂë×¢ÒâÊÂÏ
A¡¢Ö»ÄÜÊäÈëPYTHONÃüÁî¡£
B¡¢ÔÚÎļþÖдòÓ¡Óï¾äÊDZØÐëµÄ¡£
C¡¢ÔÚ½»»¥Ä£Ê½ÏµĴúÂë±àд²»ÐèÒªËõ½ø¡£
D¡¢ÁôÒâÌáʾ·ûµÄ±ä»¯ºÍ¸´ºÏÓï¾ä


Ïà¹ØÎĵµ£º

´ô´ôµÄPython ±Ê¼Ç


һЩ×ۺϵÄÐÅÏ¢
Python
ÀËõ½øºÜÖØÒª¡£Ã»ÓмâÀ¨ºÅ²»Òª½ô£¬

Python
¸ù¾ÝËõ½øÀ´·Ö¸îÓï¾ä¿é¡£
²ÎÊý²»ÐèÒª¶¨Ò壬¿ÉÒÔÖ±½ÓʹÓá£
Help(var)
²é¿´
var
µÄ°ïÖú¡£
Var
¿ÉÒÔΪÈκζ«Î÷£¬º¯Êý£¬Ä£¿é£¬Àà¡£
Python
ÖеÄ×Ö·û´®ÊDz»¿É±äµÄ¡£
Pass 
±íʾ¿ÕÓï¾ä¿é¡£
# ×¢ÊÍ
 
String
r‘I&rsquo ......

PythonÖеĵ¥Ôª²âÊÔ

   ½ñÍíÊÔÁËÒ»ÏÂPython×Ô´øµÄµ¥Ôª²âÊÔ£¬Ö÷ÒªÊDzο¼ÁËPythonµ¥Ôª²âÊÔ¿ò¼Ü
µÄÓйØ×ÊÁÏ£¬ÕÛÌÚÁËÒ»¸öСʱ×óÓÒ£¬×ÜËãÔÚEric 4ͨ¹ýµÄ¼¸¸ö¼òµ¥µÄµ¥Ôª²âÊÔ¡£ÔÚÕâÀォËùµÃµÄÏà¹Ø֪ʶ¼Ç¼ÏÂÀ´£¬·½±ã½«À´²éѯ¡£
    python×Ô´øµÄµ¥Ôª²âÊÔÄ£¿éÊÇunittest£¬´Ó2.1ÒÔºóΪ±ê×¼¿âµÄÒ»²¿·Ö
    1 ......

ÓÃPythonʵÏÖÍøÕ¾²âÊÔ

²âÊÔÍøÕ¾£ºBaiduÖ÷Ò³ÒÔ¼°Ïà¹ØµÄÒ³Ãæ
Ö÷Ì⣺ºÚºÐ²âÊÔ£¬¹¦ÄܲâÊÔ£¬ÐÔÄÜ/ѹÁ¦²âÊÔ£¬°²È«²âÊÔ£¬ Êý¾Ý×Öµä¹ÜÀí
1. ²âÊÔÒ³ÃæÊÇ·ñ¿É·ÃÎʵģ»
1.1 HTTP request status = 200, Ò³ÃæÏÂÔØÕýÈ·
from urllib import urlopen
# set up
url = None
# test
url = urlopen('http://www.baidu.com')
assert url.getcode() == 200
# ......

python ÖÐ base64 ѹËõͼƬ£¬ÓÃpost´«ËÍ


Including binaries in your sources
+y F J2A T&N1H f(L ]0
Sometime it's handy to include small files in your sources (icons, test files, etc.)CNOUG²©¿ÍÊ×Ò³ P x z c W R K+x3{ N
CNOUG²©¿ÍÊ×Ò³ h I A O$k-n P
Let's take a file (myimage.gif) and convert it in base64 (optionnaly compressing it wit ......

pythonÄ£¿é

¼ò½é
ÄãÒѾ­Ñ§Ï°ÁËÈçºÎÔÚÄãµÄ³ÌÐòÖж¨ÒåÒ»´Îº¯Êý¶øÖØÓôúÂë¡£Èç¹ûÄãÏëÒªÔÚÆäËû³ÌÐòÖÐÖØÓúܶຯÊý£¬ÄÇôÄã¸ÃÈçºÎ±àд³ÌÐòÄØ£¿Äã¿ÉÄÜÒѾ­²Âµ½ÁË£¬´ð°¸ÊÇʹÓÃÄ£¿é¡£Ä£¿é»ù±¾ÉϾÍÊÇÒ»¸ö°üº¬ÁËËùÓÐÄ㶨ÒåµÄº¯ÊýºÍ±äÁ¿µÄÎļþ¡£ÎªÁËÔÚÆäËû³ÌÐòÖÐÖØÓÃÄ£¿é£¬Ä£¿éµÄÎļþÃû±ØÐëÒÔ.pyΪÀ©Õ¹Ãû¡£
Ä£¿é¿ÉÒÔ´ÓÆäËû³ÌÐò ÊäÈë ÒÔ±ãÀûÓÃËüµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ