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

³ÌÐò python ץȡÐÂÀ˶ÁÊéƵµÀС˵

¶þ½øÖÆÎļþÏÂÔصØÖ·£º
SinaGetBook
Ч¹ûÈçͼ£º
´úÂ룺
#!/usr/bin/env python
#coding=utf-8
#!/usr/bin/env python
#coding=utf-8
import traceback
import sys
import wx
import re
import urllib
import wx.richtext as rt
import wx.lib.buttonpanel as bp
import Casing
import Debug
def trace_back():
try:
return traceback.print_exc()
except:
return ''
class Window(wx.Frame):
def __init__(self):
sys.setdefaultencoding("utf-8")
wx.Frame.__init__(self,None,-1,u'ÐÂÀËÍøͼÊéƵµÀץȡ¹¤¾ß',pos=wx.Point(0, 0),size=(800,620))
l1 = wx.StaticText(self, -1, u"Ŀ¼URL£º")
self.t1 = wx.TextCtrl(self, -1, "http://vip.book.sina.com.cn/book/?book=27633", size=(500, -1))
l2 = wx.StaticText(self, -1, u"ÄÚÈÝURLǰ׺£º")
self.t2 = wx.TextCtrl(self, -1, "http://vip.book.sina.com.cn/book/", size=(500, -1))
l3 = wx.StaticText(self, -1, u"Ìæ»»µÄÄÚÈÝ£º")
self.t3 = wx.TextCtrl(self, -1,
u"ÔĶÁ‘ÁõÃÍ’µÄÆäËû×÷Æ·£º \n"
u"http://vip.book.sina.com.cn/book/?book=39011¡¶ÀÇÑÀ¡·×÷ÕßÐÂ×÷£º±ùÊÇ˯×ŵÄË®\n"
u"http://vip.book.sina.com.cn/book/?book=41217ÁõÃÍչʾ¾Ñ»÷ÊÖÉñÃØÉú»î£º´Ì¿Í\n"
u"http://vip.book.sina.com.cn/book/?book=38884ÖйúÌØÖÖ²¿¶ÓÉú´æʵ¼£ºÀÇÑÀ\n"
u"http://vip.book.sina.com.cn/book/?book=43226ÁõÃÍ×îÐÂÁ¦×÷£ºÈçÁÙ´óµÐ",
size=(500, 100), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER)
self.t3.SetInsertionPoint(0)
l4 = wx.StaticText(self, -1, u"ÄÚÈÝ")
#self.t4 = wx.TextCtrl(self, -1,"",
# size=(600, 400), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER)
self.t4 = rt.RichTextCtrl(self,-1,"",size=(600, 400), style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER);
#self.t4.SetInsertionPoint(0)


self.b = wx.Button(self, -1, u"¿ªÊ¼×¥È¡")
self.Bind(wx.E


Ïà¹ØÎĵµ£º

PythonÄ£¿éѧϰ

¡¡¡¡copyÄ£¿éÓÃÓÚ¶ÔÏóµÄ¿½±´²Ù×÷¡£¸ÃÄ£¿é·Ç³£¼òµ¥£¬Ö»ÌṩÁËÁ½¸öÖ÷ÒªµÄ·½·¨£º
copy.copy
Óë
copy.deepcopy
£¬·Ö±ð±íʾdz¸´ÖÆÓëÉÖÆ¡£Ê²Ã´ÊÇdz¸´ÖÆ£¬Ê²Ã´ÊÇÉÖÆ£¬ÍøÉÏÓÐÒ»¿¨³µÒ»¿¨³µµÄ×ÊÁÏ£¬ÕâÀï²»×÷Ïêϸ½éÉÜ¡£¸´ÖƲÙ×÷Ö»¶Ô¸´ºÏ¶ÔÏóÓÐЧ¡£Óüòµ¥µÄÀý×ÓÀ´·Ö±ð½éÉÜÕâÁ½¸ö·½·¨¡£
dz¸´ÖÆÖ»¸´ÖƶÔÏó±¾Éí£¬Ã»Óи´ÖƸöÔÏó ......

£¨×ª£©UnicodeºÍPythonµÄÖÐÎÄ´¦Àí

      ——ÓÉÓÚ×î½üÔÚ×öÓйØÍøÒ³ËÑË÷µÄÏîÄ¿£¬Éæ¼°µ½Ò»Ð©±àÂë·½ÃæµÄ֪ʶ£¬Ð¡µÜÔÚÍøÉÏżȻµØ·¢ÏÖÁËÕâôһƪÎÄÕ£¬ºÜÒ׶®£¬²»»Þɬ£¬ÎªÁË·½±ã×Ô¼ºÒ²Í¬Ê±ÄÜ·½±ã´ó¼Ò£¬¾ÍתÁ˹ýÀ´£¬ÒÔ×÷²Î¿¼……
      ÎÄÕ³ö´¦£ºhttp://blog.csdn.net/tingsking18/arc ......

¼¸µÀPythonµÄСϰÌâ

ѧϰPythonµÄµÀ·ÂþÂþ£¬¹â¿´²»Á·±È½ÏÎÞÁÄ¡£
ÕÒÁ˸öÍøÒ³£¬ÉÏÃæÓм¸µÀÏ°Ì⣬ÎÞÁÄÖ®ÓàÄÃÀ´Á·ÊÖ£¬»¹ÓÐЩÀÖȤ¡£
ÊÇÕâÀhttp://www.cnblogs.com/belaliu/archive/2006/11/25/572140.html
×¢£ºÏ°ÌâºóÃæÌùµÄ´úÂë²»Ò»¶¨ÊÇ×îÓŵġ£
´ó²¿·Ö±È½ÏºÃ½â¾ö£¬ÓеãÄѶȵÄÊǵÚ4Ìâ×öÈ¥³ý×Ö·û´®ÄڵĿոñµÄ²Ù×÷¡£
ÕÒÁËÍøÉϵĽâ¾ö·½°¸£¬ÓÐÕâ ......

Python¿âÏê½âÖ®ÍøÂç(2)

×òÌìÊÔÁËÏÂÓÃHTMLParserÀàÀ´½âÎöÍøÒ³£¬¿É·¢ÏÖ½á¹û²¢²»ÀíÏë¡£²»¹ÜÔõô˵£¬ÏÈдϹý³Ì£¬Ï£ÍûºóÀ´ÈËÄÜÔÚ´Ë»ù´¡ÉϽâ¾öÎÒËùÓöµ½µÄÎÊÌâ¡£
дÁË2Ì×½â¾ö·½°¸£¬µ±È»Õâ2Ì×Ö»ÄܶÔÌض¨ÍøÕ¾ÓÐЧ¡£ÎÒÕâÀïÖ÷Ҫ˵Ã÷϶ÔBBCÖ÷Ò³www.bbc.co.ukºÍ¶ÔÍøÒ×www.163.comµÄ½âÎö¡£
¶ÔÓÚBBC£º
ÕâÌ×Òª¼òµ¥µÃ¶à£¬¿ÉÄÜÊǸÃÍøÒ³µÄ±àÂë±È½Ï±ê×¼°É
import ......

¿ª·¢PythonÓÃʲô¹¤¾ßºÃ£¿

    ¹¤ÓûÉÆÆäʱØÏÈÀûÆäÆ÷£¡
    ¿ª·¢PythonÓÃʲô¹¤¾ßºÃÄØ£¿Æäʵ¸ÕѧPythonµÄ»°£¬Ê¹ÓÃIDLE¾Í¹»ÁË£¬ËäÈ»µ÷ÊÔ²»ÊÇÌر𷽱㣬µ«ÊǶÔÓÚ³õѧÒѾ­¹»ÁË£¬¿ÉÒÔʹÓÃPrint½øÐмòµ¥µÄµ÷ÊÔ£¬²»½¨ÒéʹÓüÇʱ¾½øÐпª·¢£¬²»ÖªµÀµÄÈÏΪÄãºÜÅ££¬ÖªµÀµÄ……ÕâÊÇ×Ô¼º¸ø×Ô¼ºÕÒ×ïÊÜ£¬ÓÃEditplusÃ²Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ