ÕÕ×ÅÊéÉÏдµÄ£¬Ö´ÐÐʱ±¨´í£¨Python2.6£©
import wx
class InsertFrame(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'Frame With Button',size=(300,100))
panel = wx.Panel(self)
  ......
ʹÓÃÔ´Îļþ
#!/usr/bin/python
# Filename : helloworld.py
print 'Hello World'
ÎÒÔõôҲ¿´²»¶®£¡Ö»ÊÇ×îºóÒ»ÐÐÎÒÖªµÀ~~Ç°ÃæÁ½ÐÐÊÇʲôÒâ˼ÄØ£¿
½Ì³ÌÉÏ˵Èç¹ûÄãʹÓÃIDLE£¬ÇëʹÓò˵¥Edit->Run Script»òÕßʹÓüüÅÌ¿ì½Ý·½Ê½Ctrl-F5
ÎÒÊÔ¹ýÁË
Á½ÖÖ·½·¨¶¼Ã»ÓÐÓÃ
Ç°Ò»ÖÖ EIDTÀï¸ù ......
ϲ»¶PythonµÄÅóÓÑÇë½ø.
ÏêϸÐÅÏ¢Çë²é¿´:
http://blog.csdn.net/lgg201/archive/2009/10/08/4643635.aspx
Let's-python-ϵÁÐÊÓƵ·¢²¼×¨Ìù ÊÕ²Ø
ÊÓƵ½ÏÔçµÄʱºò¾Í˵ÊÇҪ¼ÁË, ÕâÒ»ÖܼÁ˵ÚÒ»¼¯, ÓÉÓÚµÚÒ»´Î¼ÊÓƵ, ¼µÄÎļþÌ«´óÁË, 800¶àM, ×îºóÖ»ºÃµ¥¶ÀѹËõÒ»¸öflash, ÏÖÔÚÉÏ´«µ½ÁËQQµÄÎļþÖÐ× ......
//ÏÂÃæµÄ´úÂëÔËÐÐÕý³£
tomstrs=re.findall(......)
mtxx=''
for tomstr in tomstrs:
tomstr=tomstr.strip()
if tomstr:
mtxx += tomstr
print mtxx
#print³öÀ´µÄ½á¹ûÕý³£
//Èç¹ûÎÒÔÚÉÏÃæµÄ´úÂëÖмÓÒ»ÐÐ
tom ......
±¾ÎÄÕª×Ô¡¶¿É°®µÄPython¡·¡°¹âÅ̹ÊÊ¡±CDay-1 ʵÓû¯ÖÐÎÄ¡£
[img]http://t.douban.com/mpic/s3901817.jpg[/img]
CDay-1 ʵÓû¯ÖÐÎÄÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯
ÄãÅöµ½99%µÄÎÊÌ⣬ÆäËûÈË֮ǰÒѾÓöµ½¹ýÁË£¬ËùÒÔ£¬×î¼ÑµÄ½â¾ö·½Ê½¾ÍÊÇÕÒµ½ÄǶαðÈ˽â¾öÏàËÆÎÊÌâµÄ´úÂ룡
»Ø¹ËÐèÇóС°×ÒѾʵÏÖµÄÐèÇó¿ÉÒÔʵÏÖÈçϹ¦Ä ......
Èç¹ûÒ»¶Î´úÂë
Python code:
#!/usr/bin/python2.5
from urllib2 import Request,urlopen,URLError
def check():
req = Request('http://www.google.com')
try:
res = urlopen(req).read()
return res
except URLError, e:
if hasattr(e, 'reason'):
return('We failed to reac ......