Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : Python

python Æ¥ÅäurlÕýÔò±í´ïʽ

ÎÒÏÖÔÚÓÐÒ»¸öÕâÑùµÄ×Ö·û´®str1="http://hi.baidu.com/rubylang/blog/item/1661ad50d600c46784352445.html#/html/body/table[1]/tr/td"
Ôõôдһ¸ö±í´ïʽÀ´Æ¥ÅäËü£¬ÐèÒªpythonÓïÑÔ£¬²¢ÇÒÄܹ»°Ñ
http://hi.baidu.com/rubylang/blog/item/1661ad50d600c46784352445.html£¬¸ú/html/body/table[1]/tr/tdÌáÈ¡³öÀ´ ......

python:ץȡÍøÒ³ÄÚÈÝhtmlת»»³Éxml?

RT:
ץȡÍøÒ³ÄÚÈÝʱÈçºÎ½«htmlת»»³Éxml?
3Q.


ÕÒµ½Õâ¶Î´úÂ룺
#!/usr/bin/python
import sys from xml.dom
import core from xml.dom.html_builder
import HtmlBuilder
b = HtmlBuilder()
b.feed(sys.stdin.read())

doc = b.document
print doc.toxml()

²»¹ýϵͳÀïûÓÐhtm ......

python³ÌÐòÊÇÈçºÎÖ´ÐеÄ?

´øclassµÄpython³ÌÐòÊÇÔõÑùÖ´ÐеÄ?
Èç

#!/usr/bin/python

import sgmllib,urllib
class MyParser(sgmllib.SGMLParser):
    "A simple parser class."
    def parse(self, s):
        "Parse the given string 's'." ......

python:ÈçºÎÒýÓÃÀàÖеıäÁ¿£¿

RT
python:ÈçºÎÒýÓÃÀàÖеıäÁ¿£¿
¶¨ÒåÁËÒ»¸öclass£¬Óиö±äÁ¿data£¬ÊÇ´¦ÀíºóµÃµ½µÄÊý¾Ý£¬ÎÒÏëÔÚͬһÎļþÖеÄÆäËüµØ·½ÒýÓôËÎļþ£¿Ò»°ãÓÐʲô°ì·¨£¿
obj.data

¶¨ÒåÁËÒ»¸öÈ«¾Ö±äÁ¿£¬global a
ÔÚmainÀォa¸³Öµ£¬È»ºóÔÚclassÀïÒýÓÃa,Ìáʾa䶨Ò壿
Çë¸ßÈ˴ͽ̡£

¸³ÖµÇ°ÉùÃ÷Ï£º
global a
......

python:È«¾Ö±äÁ¿µÄÎÊÌ⣿

³ÌÐò½á¹¹ÈçÏ£º

#¶¨ÒåÁËÈ«¾Ö±äÁ¿A
A=0

#class´¦ÀíA
class b
    global A
    A


#mainÀï¸øA¸³Öµ
    A = 1

³ÌÐòÖ´ÐÐʱ·¢ÏÖclassÀïAµÄÖµ»¹ÊÇ0

ÐÂÊÖÓм¸¸öÎÊÌ⣺
1¡¢python³ÌÐòÖ´ÐеÄ˳Ðò£¬Èç±¾Àý,ÓÉÖ´Ðнá¹û¿´£¬ÊÇ˳ÐòÖ´ÐУ¿
2 ......

¾«ÐÄËѼ¯µÄѧϰpythonµÄ7±¾Êé

ѧϰpythonµÄ7±¾Êé
°üÀ¨6±¾chm£¬Ò»±¾pdf×ÊÁÏ
¶ÔѧϰpythonÓкܴóµÄ°ïÖú 
http://download.csdn.net/source/619791
¾«ÐÄËѼ¯£¬²»Òª»ý·Ö£¬ÄóöÀ´·ÖÏí
лл¥Ö÷£¬ÐÁ¿àÁË~



lz ×îºÃ°ÑÊéÃûºÍ¼òµ¥½éÉܼÓÉÏ
²»È»¡°¾«ÐÄ¡±Óеã¶Ô²»ÉÏ

lzºÃÈË¡£

Ïȶ¥ÔÙÏ¡£ºÇºÇ

ËäÈ»ÎÒÈ«¶¼ÓУ¬µ«»¹ÊÇÒªÔÞÒ»¸ö£¡

Â¥Ö÷Ì«º ......
×ܼǼÊý:175; ×ÜÒ³Êý:30; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ