pythonÏ߳̽»Á÷ - °¤ÌßÖ°ÑÄ / ²ÅÈëÖ°³¡
תÌû£º
import sys
from wxPython.wx import *
from wxPython.lib import newevent
DispatchEvent, EVT_DISPATCH = newevent.NewEvent()
class GenericDispatchMixin:
def __init__(self):
EVT_DISPATCH(self, self.OnDispatchEvent)
def OnDispatchEvent(self, event):
event.method(*event.arguments)
def ThreadSafeDispatch(self, method, *arguments):
wxPostEvent(self, DispatchEvent(method = method, arguments = arguments))
import wx
import time
import threading
import Queue
import traceback
import sys
from GenericDispatch import GenericDispatchMixin
class MainApp(wx.App):
def OnInit(self):
self.frame = MainFrame()
self.frame.Show(True)
self.SetTopWindow(self.frame)
return True
class MainFrame(wx.Frame, GenericDispatchMixin):
def __init__(self):
wx.Frame.__init__(self, None, -1, u¡¯³¤ÔËÐвâÊÔ¡¯)
GenericDispatchMixin.__init__(self)
box = wx.BoxSizer(wx.HORIZONTAL)
self.ID_BTN = wx.NewId()
self.btn = wx.Button(self, self.ID_BTN, u¡¯¿ªÊ¼¡¯, size=(60, 22))
box.Add(self.btn, 0, wx.ALIGN_CENTRE|wx.ALL, 0)
Ïà¹ØÎÊ´ð£º
ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º
1¡¢·áºñµÄ¸å³ê¡£
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......
ÔÚlistÖÐÌí¼ÓÒ»¸öÀàµÄ¾Ö²¿±äÁ¿ ÕâÑù×öÊÇ·ñºÏ·¨ Çë¿´ÏÂÃæÀý×Ó:
Python code:
class A():
def __init__( self ):
self.__a = 0
self.__b = 'hello'
def get_a( self ):
ret ......
ѧϰpythonµÄ7±¾Êé
°üÀ¨6±¾chm£¬Ò»±¾pdf×ÊÁÏ
¶ÔѧϰpythonÓкܴóµÄ°ïÖú
http://download.csdn.net/source/619791
¾«ÐÄËѼ¯£¬²»Òª»ý·Ö£¬ÄóöÀ´·ÖÏí
лл¥Ö÷£¬ÐÁ¿àÁË~
lz ×îºÃ°ÑÊéÃûºÍ¼òµ¥½éÉܼÓÉ ......
C#ÀïÃæÓÃusing System.Security.Cryptography; RSACryptoServiceProvider¼ÓÃܹýµÄÏûÏ¢
ÓÃPython CryptoÖÐRSAµÄ·½·¨ ÄÜÖ±½Ó ½âÂð£¿
RSA¼ÓÃÜ·½Ê½²»ÊÇͳһµÄÂð£¿ÐèҪעÒâЩʲô£¿
ÓаïÖú¡£µ«ÊÇû½â¾öÎÊÌâ¡£¡£¡£
......
Python code:
p=[1,2,3,4,5,6]
while True:
for i in p:
if i==4:
p=[]
f=[9,8,7]
p.extend(f)
break
print i£¬',',
p. ......