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

¡¾Python¡¿ÓÃPythonʵÏÖÒ»¸ö¶íÂÞ˹·½¿éÓÎÏ·

¶íÂÞ˹·½¿éÓÎÏ·£¬Ê¹ÓÃPythonʵÏÖ£¬×ܹ²ÓÐ350+ÐдúÂ룬ʵÏÖÁ˶íÂÞ˹·½¿éÓÎÏ·µÄ»ù±¾¹¦ÄÜ£¬Í¬Ê±»á¼Ç¼Ëù»¨·Ñʱ¼ä£¬ÏûÈ¥µÄ×ÜÐÐÊý£¬ËùµÃµÄ×Ü·Ö£¬»¹°üÀ¨Ò»¸öÅÅÐаñ£¬¿ÉÒԲ鿴×î¸ß¼Ç¼¡£
ÅÅÐаñÖаüº¬Ò»ÏµÁеÄͳ¼Æ¹¦ÄÜ£¬È絥λʱ¼äÏûÈ¥µÄÐÐÊý£¬µ¥Î»Ê±¼äµÃ·ÖµÈ¡£
¸½Ô´Â룺
from Tkinter import *
from tkMessageBox import *
import random
import time
#¶íÂÞ˹·½¿é½çÃæµÄ¸ß¶È
HEIGHT = 18
#¶íÂÞ˹·½¿é½çÃæµÄ¿í¶È
WIDTH = 10
ACTIVE = 1
PASSIVE = 0
TRUE = 1
FALSE = 0
root=Tk();root.title('Russia')
class App(Frame):
def __init__(self,master):
Frame.__init__(self)
master.bind('<Up>',self.Up)
master.bind('<Left>',self.Left)
master.bind('<Right>',self.Right)
master.bind('<Down>',self.Down)
#master.bind('<Down>',self.Space)
master.bind('<space>',self.Space)
master.bind('<Control-Shift-Key-F12>',self.Play)
master.bind('<Key-F6>',self.Pause)
self.backg="#%02x%02x%02x" % (120,150,30)
self.frontg="#%02x%02x%02x" % (40,120,150)
self.nextg="#%02x%02x%02x" % (150,100,100)
self.flashg="#%02x%02x%02x" % (210,130,100)
self.LineDisplay=Label(master,text='Lines: ',bg='black',fg='red')
self.Line=Label(master,text='0',bg='black',fg='red')
self.ScoreDisplay=Label(master,text='Score: ',bg='black',fg='red')
self.Score=Label(master,text='0',bg='black',fg='red')
#Display time
self.SpendTimeDisplay=Label(master,text='Time: ',bg='black',fg='red')
self.SpendTime=Label(master,text='0.0',bg='black',fg='red')
self.LineDisplay.grid(row=HEIGHT-2,column=WIDTH,columnspan=2)
self.Line.grid(row=HEIGHT-2,column=WIDTH+2,columnspan=3)
self.ScoreDisplay.grid(row=HEIGHT-1,column=WIDTH,columnspan=2)
self.Score.grid(row=HEIGHT-1,column=WIDTH+2,columnspan=3)
#Display time
self.SpendTimeDisplay.grid(row=HEIGHT-4,column=WIDTH,columnspan=2)


Ïà¹ØÎĵµ£º

Python or Ruby

http://blog.csdn.net/myan/archive/2008/01/07/2028545.aspx
http://blog.csdn.net/gashero/archive/2007/06/03/1636030.aspx
 
ÎҸоõ»¹ÊÇpythonÓ¦Óøü¹ãһЩ£¬RubyµÄRoR×öWeb¿ò¼ÜºÃһЩ°É£¬ÖÁÓÚperl£¬ÏÖÔڸоõʵÔÚÓм¸·Ö¿àɬ…… ......

PYTHONÉèÖÃĬÈÏÓïÑÔ±àÂë

ת×Ô http://www.javaeye.com/topic/561786
Ô­Ìû£ºhttp://www.cnblogs.com/jingleguo/archive/2008/06/02/1211820.html
µ±pythonÖм䴦Àí·ÇASCII±àÂëʱ£¬¾­³£»á³öÏÖÈçÏ´íÎó£º
UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128)
0x??Êdz¬³ö128µÄÊý×Ö£¬pythonÔÚĬÈϵ ......

python mysqlµ¼ÈëÊý¾Ý

[root@pku-fan MySQL]# cat limbs.sql
CREATE DATABASE cookbook;
USE cookbook;
DROP TABLE IF EXISTS limbs;
CREATE TABLE limbs
(
    thing   VARCHAR(20),    # what the thing is
    legs    INT,     ......

pythonÖÐÕýÔò±í´ïʽÓëre Ä£¿é

1. 9.7 ÕýÔò±í´ïʽÓë re Ä£¿é
Ò»¸öÕýÔò±í´ïʽ¾ÍÊÇÒ»¸öÓÃÀ´±íʾijÖÖģʽµÄ×Ö·û´®¡£ËüÄÜ°ïÖúÄã·½±ãµÄ¼ì²éÒ»¸ö×Ö·û´®ÊÇ·ñÓëijÖÖģʽƥÅä¡£
re Ä£¿éʹ Python ÓïÑÔÓµÓÐÈ«²¿µÄÕýÔò±í´ïʽ¹¦ÄÜ¡£ compile º¯Êý¸ù¾ÝÒ»¸öģʽ×Ö·û´®ºÍ¿ÉÑ¡µÄ±êÖ¾²ÎÊýÉú³ÉÒ»¸öÕýÔò±í´ïʽ¶ÔÏ󡣸öÔÏóÓµÓÐһϵÁз½·¨ÓÃÓÚÕýÔò±í´ïʽƥÅäºÍÌæ»»¡£ re Ä£ ......

PythonÔÚwindowsϵķ¾¶ÎÊÌâ

    windowsϵķ¾¶Ïñ“f:\program files\python\backup”ÆäÖГ\”ÐèÒªÓÃתÒå·û£¬Ð´³É“\\”£¬»òÕßÇ°Ãæ¼Órд³Épath
= r’f:\program files\python\backup’µ«ÊÇÔÚµ÷ÓÃһЩϵͳÃüÁÈços.system(rar a path e:\backup)»á³ö´í£¬Ô­ÒòÊÇ“program files&rdquo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ