Commit 9711779e by BellCodeEditor

save project

parent 31201316
...@@ -17,5 +17,5 @@ class log: ...@@ -17,5 +17,5 @@ class log:
def cutall_log(self): def cutall_log(self):
self.log = {} self.log = {}
def seek_log(self): def keyseet(self, key):
pass return self.log[key]
\ No newline at end of file \ No newline at end of file
import pygame as pg #import pygame as pg
from pygame import locals #from pygame import locals
from log import log from log import log
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pg.init() #pg.init()
# 创建一个窗口 # 创建一个窗口
win = pg.display.set_mode((800, 600)) #win = pg.display.set_mode((800, 600))
win_log = log() win_log = log()
win_log.att_log("1","t 1")
win_log.att_log("2","t 2")
a = win_log.keyseet("1")
print(a)
while True: #while True:
for event in pg.event.get(): #for event in pg.event.get():
if event.type == locals.QUIT: #if event.type == locals.QUIT:
exit() #exit()
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment