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

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 ÕýÔòÆ¥ÅäÖÐÎÄ

ÔÚÎı¾ÎļþÖÐÆ¥ÅäÏî°üº¬ÖÐÎÄ
ÈçÄÚÈÝΪ£ºgamename=ÖÐÎÄ 
  key=ÌìÏÂ
Îı¾ÎļþµÄ±àÂëµÄÎļþΪutf-8
python´úÂëÈçÏ£º
# -*- coding:UTF-8 -*-
  contents=open(from_pa ......

Çë½Ì¸öpython½Å±¾ÔËÐÐ×ÜÊÇËøËÀµÄÎÊÌ⣬Çë´ó´óÖ¸½Ì£¡

Traceback (most recent call last):
  File "C:\test.py", line 80, in <module>
  cur.execute("update userdata set kb=0 where strAccountID='%s'" % name)
  ......

pythonÖеÄÀàÖÐÊôÐÔÔªËØ¼Óself.ºÍ²»¼Óself.µÄÇø±ð

ѧϰPyQt£¬·¢ÏÖÆäÖÐÒ»¶Î½Å±¾ÊÇÕâÑùµÄ£º
class Form(QDialog):
  ........
  amountLabel = QLabel("Amount")
  self.amountLabel = QLabel()
  ........
pythonÖеÄÀàÖ ......

ÇóÒ»¸öpython¿ªÔ´³ÌÐò

Ë­ÓÐpython django ¿ª·¢µÄ³ÌÐò »òÕßÖªµÀÄÄÓÐ
¸æËßÏ ÎÒÒªÒ»¸ö¿ªÔ´µÄ³ÌÐòѧϰÓà ¸Ð¾õ×Ô¼º±à³ÌºÜ²»¹æ·¶

µã»÷²é¿´¡¶Django Web ¿ª·¢Ö¸ÄÏ¡·

http://www.ibm.com/developerworks/cn/linux/l-django/

Äã˵µÄÊÇdj ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ