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

python ¶ÁhttpС¼Ç

conn = httplib.HTTPConnection(EPG_IP + ":" + HTTP_PORT)
url = FAV_URL_PARTH +"userid=" + USER_ID + FAV_DIR_MODIFY
param = '''<ps100request id="Favorite.Category.modify">
<categoryid>'''+categoryid+'''</categoryid>
<categoryname>'''+categoryname+'''</categoryname>
</ps100request>'''
print "======================",param
conn.request("POST", url, param)
strxml = conn.getresponse().read()
conn.close()


Ïà¹ØÎĵµ£º

Python ²ÎÊý֪ʶ£¨±äÁ¿Ç°¼ÓÐǺŵÄÒâÒ壩

¹ýÁ¿µÄ²ÎÊý
ÔÚÔËÐÐʱ֪µÀÒ»¸öº¯ÊýÓÐʲô²ÎÊý£¬Í¨³£ÊDz»¿ÉÄܵġ£ÁíÒ»¸öÇé¿öÊÇÒ»¸öº¯ÊýÄܲÙ×÷ºÜ¶à¶ÔÏ󡣸üÓÐÉõÕߣ¬µ÷ÓÃ×ÔÉíµÄº¯Êý±ä³ÉÒ»ÖÖapiÌṩ¸ø¿ÉÓõÄÓ¦Óá£
¶ÔÓÚÕâЩÇé¿ö£¬pythonÌṩÁËÁ½ÖÖÌرðµÄ·½·¨À´¶¨Ò庯ÊýµÄ²ÎÊý£¬ÔÊÐíº¯Êý½ÓÊܹýÁ¿µÄ²ÎÊý£¬²»ÓÃÏÔʽÉùÃ÷²ÎÊý¡£ÕâЩ“¶îÍ┵IJÎÊýÏÂÒ»²½ÔÙ½âÊÍ¡£
×¢Òâa ......

Python Import»úÖƱ¸Íü(ת)

Python Import»úÖƱ¸Íü(ת)
   ×î½üÔÚ¿´¡¶PythonÔ´ÂëÆÊÎö¡·£¬¶ÔPythonÄÚ²¿ÔËÐлúÖƱÈÒÔÇ°Á˽âµÄ¸üÉîÈëÁË£¬¸Ð¾õ×Ô¼ºÓлú»áÒ²¿ÉÒÔ×ö¸öСÐ͵Ķ¯Ì¬½Å±¾ÓïÑÔÁË£¬ºÇºÇ£¬µ±È»
ÊÇ´µÅ£ÁË¡£Ä¿µÄµ±È»²»ÊÇ´´ÔìÒ»¸ö¶¯Ì¬ÓïÑÔ£¬Ä¿µÄÖ»ÓÐÒ»¸ö£º¸üºÃµÄʹÓÃPython¡£¿´µ½Ä£¿éµ¼ÈëÄÇ¿éµÄʱºò£¬ÖÕÓÚ¶ÔÄ£¿éµ¼Èë»úÖƱȽÏÁ˽âÁË£¬ÒÔ·ÀÍ ......

PDF×Ô¶¯¸ÄÃûµÄPython³ÌÐò


ÏÂÔصÄPDFÎĵµÖÐÓеÄÃüÃûºÜÂÒ£¬¾ÍÏëÆðÁË×Ô¼ºÐ´¸ö³ÌÐò£¬È»ºó¶ÁÈ¡PDFµÄtitleÊôxing£¬¸ù¾ÝÕâ¸öÊôxing£¬¸ü¸Ä´ÎÎĵµµÄÃû×Ö£¡ÒÔÏÂÊÇ´úÂ룺
ÐèÒªµ½£ºhttp://pybrary.net/pyPdf/ÉÏÃæÏÂÔضÔӦƽ̨µÄPDFµÄ¿âÎļþ£¬È»ºó°²×°£¬µ¼Èë¡£
#encoding:utf-8
import os
import operator
from pyPdf import PdfFileWriter, PdfFileReader ......

PythonÄ£¿éѧϰ urllib


    urllibÄ£¿éÌṩµÄÉϲã½Ó¿Ú£¬Ê¹ÎÒÃÇ¿ÉÒÔÏñ¶ÁÈ¡±¾µØÎļþÒ»Ñù¶ÁÈ¡wwwºÍftpÉϵÄÊý¾Ý¡£Ã¿µ±Ê¹ÓÃÕâ¸öÄ£¿éµÄʱºò£¬ÀÏÊÇ»áÏëÆð¹«Ë¾²úÆ·µÄ¿Í»§¶Ë£¬Í¬ÊÂÓÃC++ÏÂÔØWebÉϵÄͼƬ£¬ÄÇÖÖ“Í´¿à”µÄ±íÇé¡£ÎÒÒÔÇ°·­Òë¹ýlibcurl½Ì³Ì£¬ÕâÊÇÔÚC/C++»·¾³Ï±ȽϷ½±ãʵÓõÄÍøÂç²Ù×÷¿â£¬Ïà±ÈÆðlibcurl£¬PythonµÄurl ......

Python³£ÓÃÄ£¿éÏÂÔØÁ´½Ó

Python http://www.python.org/download/ wxPython http://www.wxpython.org/download.php#binaries Vpython http://vpython.org/contents/download_windows.html Matplotlib http://sourceforge.net/projects/matplotlib/files/matplotlib/ PyGlet http://www.pyglet.org/download.html PyGame http://www.pyga ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ