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

»ù±¾Êý¾Ý½á¹¹µÄpythonʵÏÖ ¶ÓÁÐ

¶ÓÁУº
Óë¶ÑÕ»ÀàËÆ£¬Í¨¹ýpythonµÄÁбíÀàÐÍÀ´ÊµÏÖ£¬²Î¿¼ help(list)
shoplist=['apple','mango','carrot','banana']
print 'I have',len(shoplist),'items to purchase'
print 'these items are:'
for item in shoplist:
print item,
shoplist.append('rice')
print 'my shopping list is now', shoplist
shoplist.sort()
print 'Sorted shopping list is',shoplist
olditem=shoplist[0]
del shoplist[0]
print 'I bought the',olditem
print 'My shopping list is now',shoplist


Ïà¹ØÎĵµ£º

[Ô­´´]PythonÄÚ´æй©²é¿´Æ÷ʵÏÖ

[Ô­´´]PythonÄÚ´æй©²é¿´Æ÷ʵÏÖ
by AKara 2009-04-23 @ http://blog.csdn.net/akara @ akaras@163.com
   
---------------------------------------------------------------------
  Ϊ¸üºÃ¶¨Î»PythonÄÚ´æй©Çé¿ö£¬Ð´ÁËÒ»¸öеÄPythonÄÚ´æй©²é¿´Æ÷Ä£¿é¡£
Ä£¿éÓÐÈçϹ¦ÄÜ£º
  * ½«ËùÓ ......

Python ÏÂÔØÍøÒ³µÄ¼¸ÖÖ·½·¨

×ܽáÏ£¬Python ÏÂÔØÍøÒ³µÄ¼¸ÖÖ·½·¨
1
 fd = urllib2.urlopen(url_link)
 data = fd.read()
 ÕâÊÇ×î¼ò½àµÄÒ»ÖÖ£¬µ±È»Ò²ÊÇGetµÄ·½·¨
2
ͨ¹ýGETµÄ·½·¨
def GetHtmlSource(url):
    try:
   
        htmSource = ''
 &nb ......

·ÉÐÅÆóÒµ°æʹÓÃÁËpython...

¶ÔÓÚ¸öÈ˰棬ʹÓÃÁË.NET£¬°²×°ÍêÆóÒµ°æºó£¬¿´ÁË¿´Ä¿Â¼£¬·¢ÏÖ´óÁ¿python½Å±¾¡£dllÖÐÒ²ÓÐsqlite3.dll
C:\Program Files\China Mobile\EfetionĿ¼ÏÂÎļþ£º
Addin
boost_python.dll
bz2.pyd
dbghelp.dll
EFetion.exe
EFetion.exe.manifest
EFWP.exe
EFXLiveUpdate.exe
EFXLiveUpdate.exe.manifest
Face
Help.chm
......

python¸Ä±äÎļþ¼°Æä×ÓĿ¼µÄÊôÐÔ


1.¸Ä±ä±¾ÎļþµÄÊôÐÔ
import
os
import
stat
os.chmod( filename, stat.S_IWRITE )
2.¸Ä±ä±¾Ä¿Â¼¼°Æä×ÓĿ¼ÊôÐÔ
import
os
os.system(r
'
attrib -r' + path +'\\*.* /s
'
)
3.½éÉܸıäÎļþÊôÐÔµÄdosÖ¸Áî
Attrib
ÏÔʾ¡¢ÉèÖûòɾ³ýÖ¸ÅɸøÎļþ»òĿ¼µÄÖ»¶Á¡¢´æµµ¡¢ÏµÍ³ÒÔ¼°Òþ²ØÊôÐÔ¡£Èç¹ûÔÚ²»º¬²ÎÊýµÄÇ ......

pythonµÄ±àÂëÎÊÌâ

  Ç°Á½ÌìÀí½âÁËunicode¡¢utf-8¡¢gb2312ÕâЩ±àÂëÖ®¼äµÄ¹ØϵÒԺ󣬽ñÌìÖÕÓÚŪÃ÷°×ÁËÔÚpythonÀïÃæµÄ±àÂëÎÊÌâ¡£ÎÒÃÇÔÚдpython½Å±¾Ê±Èç¹ûÓÐÖÐÎĵÄ×Ö·û´®£¬ÔÚÔËÐеÄʱºòÓпÉÄܻᱨ´íÒ²ÓпÉÄÜ»á³öÏÖÂÒÂë¡£Ò»°ã¼ÓÉÏ# -*- coding:utf-8 -*-¾Í²»»á±¨´íÁË£¬µ«ÊÇ»¹¿ÉÄÜÓÐÂÒÂëÎÊÌ⣬¶øÇÒͬÑùµÄ´úÂëÔÚ²»Í¬µÄ±à¼­Æ÷ÖеóöµÄ½á¹û ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ