Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Á·ÊÖ


¿ÉÒÔ²¥·Å´ó²¿·ÖµÄÒôÊÓƵ.
demo download:  http://www.sandy1219.com/python/media.rar
playMP3.py
# -*- coding: utf-8 -*-
import wx;
import wx.media;
import os;
import SPrint;
import mediaStateBar;
import mediaList;
import SaveLog;
import MediaItem;
woldcart = "media files|*.*|avi ......

Python ¶þ½øÖÆÎļþ¶ÁÈ¡ÏÔʾ

filename=raw_input('enter file name:')
f=open(filename,'rb')
f.seek(0,0)
index=0
for i in range(0,16):
print "%3s" % hex(i) ,
print
for i in range(0,16):
print "%-3s" % "#" ,
print
while True:
temp=f.read(1)
if len(temp) == 0:
break
else:
print "%3s" % temp.encode('hex'),
......

ѧϰ¡¶PythonÓïÑÔÈëÃÅ¡·µÚËÄÕ º¯Êý


ÔõôÕÒ²»µ½µÚÈýÕµÄѧϰ±Ê¼ÇÁË£¿¶ªÁË£¿
PythonµÄº¯ÊýûÓÐʲôµÄ£¬¿ÉÒÔ˵£¬¿´ÁË¡¶¼òÃ÷Python½Ì³Ì¡·ºó£¬¾Í»áдÁË¡£
ÕâÒ»ÕÂÌṩµÄÄÚÈÝÒ²±È¡¶¼òÃ÷Python½Ì³Ì¡·Òª¶àһЩ¡£±È½Ï¸´ÔÓµÄÊÇ×÷ÓÃÓò¹æÔò£¬²»ÖªµÀÊÇÊéû½²Çå³þ»¹ÊÇ·­ÒëµÃ²»ºÃ£¬±È½ÏÄѶ®¡£Ç®Äܵġ¶C++³ÌÐò½Ì³Ì¡·¹ØÓÚº¯ÊýµÄ×÷ÓÃÓò¹æÔò½²µÃÒªÇå³þЩ£¬ÓÐC++µÄ֪ʶÔÚÀïÃ棬 ......

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

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

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

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