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

¿´¿´Õâ¶ÎPython´úÂëÎÊÌâ³öÔÚÄÄ

ÕÕ×ÅÊéÉÏдµÄ£¬Ö´ÐÐʱ±¨´í£¨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)
        button = wx.Button(panel,label="Close",pos=(125,20),
                          size=(50,50))
        self.Bind(wx.EVT_BUTTON,self.OnCloseMe,button)
        self.Bind(wx.EVT_CLOSE,self.OnCloseWindow)

    def OnCloseMe(self,event):
        self.Close(True)

    def OnCloseWindow(self,event):
        self.Destroy()

if __name__=='__main__':
    app = wx.PySimpleApp()
    frame = InsertFrame(parent=None,id=-1)
    frame.Show()
    app.MainLoop()
   
±¨´íÐÅÏ¢ÈçÏ£º
Traceback (most recent call last):
  File "D:\Python26\test\wx\button.py", line 19, in <module>
    frame = InsertFrame(parent=None,id=-1)
  File "D:\Python26\test\wx\button.py", line 4, in __init__
    wx.Frame.__init__(self,parent,id,'


Ïà¹ØÎÊ´ð£º

pythonÖÐÏß³ÌÎÊÌ⣿£¿

ÎÒÏÖÔÚÊÇÕâÑùµÄ
¿ªÁËÒ»¸ö×ÓỊ̈߳¬¶ÁÈ¡ÏÂÃæµÄÏûÏ¢
±¾ÒâÊÇ
Python code:

while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass

¼ÙÈ ......

Python 3 ·¢²¼Õâô¾ÃÁË£¬ÊÇʱºòתÒÆÁËô£¿

    RT£¬Ã²ËÆPythonÖ®¸¸Ò²ËµÈç¹ûÄãÏÖÔÚ¿ªÊ¼ÐµÄÏîÄ¿µÄ»°£¬×îºÃÊÇÖ±½ÓʹÓÃPython3£¬¿ÉÊÇʵ¼ÊÉÏ´ó¼ÒʹÓõô󲿷ֻ¹ÊÇ2.5£¬¹À¼ÆÓÃ2.6µÄ¶¼²»ÊǺܶ࣬²¢ÇÒÏà¶ÔÓ¦µÄÐí¶àÀ©Õ¹¶¼Ã»ÓÐ3¶ÔÓ¦µÄ°æ±¾¡£
    ......

Python Unicode±àÂëÎÊÌâ

Ç°¼¸Ìì¸Õ¸Õ½Ó´¥Python£¬ºÃ¶àÎÊÌâ²»Ã÷°×
´úÂëÈçÏ£¬¿ÉÒÔÕý³£Êä³ösheetname.Èç¹û°Ñ±àÂ뷽ʽ¸Ä³Éutf16¾Í»á±¨´í
TypeError: compile() expected string without null bytes
ÇëÎÊÊÇΪʲô£¿
»¹ÓÐÊä³öµØÄÚÈÝÊÇ ......

python¶ÁxmlÖÐÔªËØ˳ÐòÎÊÌâ


a.xmlÄÚÈÝÈçÏÂ:
      </project>
<project name="asdf" branch="asfasdfas" naname="xiao xin" QD6="091010">
<compo ......

python ÓÃ%À´ÅжÏÑ­»·

¸Õ¸Õ¿ªÊ¼Ñ§python Çë½ÌÒ»¸öÎÊÌâ:
ÓÃ def n in range(100):
¿ªÊ¼Ñ­»·
Óà % ·½·¨À´ÅÐ¶Ï ÖÆÑ­»·4´Î¾Í ´òÓ¡ '*' * 25¸ö .
лл!ÔÚÏßµÈ....
for i in range(100):
    if i%4 == 0:
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ