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

»ù±¾Êý¾Ý½á¹¹µÄpythonʵÏÖ ¶ÑÕ»

Ç°ÑÔ£º
×î½üÓÖÏëѧϰpython,ÓÖÏëÈ¥ÎÂÏ°Ò»ÏÂËã·¨£¬ÓÚÊǾÍÏë³öÁËÕâ¸öÁ½²»ÎóµÄ·½·¨,^_^
¶ÑÕ»£º
ʹÓÃpythonµÄÁбí½á¹¹£¬ÏêÇé¿ÉÒԲ鿴help(list)
#Filename: stack.py
shoplist=['apple','mango','carrot','banana']
shoplist.append('rice')
popitem=shoplist[-1]
del shoplist[-1]
print 'the popitem is',popitem
print 'My shopping list is now',shoplist
print 'the next pop item is',shoplist[-1]
print 'after the next pop,the shopping list is',shoplist[:-1]


Ïà¹ØÎĵµ£º

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»ñÈ¡htmlÒ³ÃæµÄÄÚÈÝ

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): ......

±àÒëÁËwindowsϵÄpython3Á¬½ÓMysqlµÄ¿âmypysql


±àÒëÁËÒ»¸öwindowsϵÄpython3Á¬½ÓMysqlµÄ¿â
mypysql
°æ±¾ÊÇ 0.5.1 £¬¸ù¾Ý¹Ù·½µÄÐÞ¸ÄÈÕÖ¾£¬Õâ¸ö°æ±¾ÐÞ¸ÄÁË0.5ÖÐÒ»¸öÄÚ´æй©ÎÊÌâ¡£
Ô´´úÂëºÍ±àÒëºóµÄÎļþΪ£º
http://211.147.215.55/down/mypysql-0.5.1-win.zip
mypysqlµÄ¹Ù·½µØÖ· https://sourceforge.net/projects/mypysql/
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ