本文整理匯總了Python中GUI.keyboardBindings方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.keyboardBindings方法的具體用法?Python GUI.keyboardBindings怎麽用?Python GUI.keyboardBindings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.keyboardBindings方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Logger
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import keyboardBindings [as 別名]
# Add parent folder in the sys.path if not there already
parent = os.path.split(os.getcwd())[0]
if parent not in sys.path:
sys.path.append(parent)
import Game.Game as P
import Tkinter as T
import GUI
from Game.Logger import Logger
#import Game.Logger as Logger
if __name__ == '__main__':
root= T.Tk()
root.title('General Dice Game')
TheGame = P.Game(PLAYERS, SETTINGS_FILE, 30)
root.game = TheGame
# Create a logger, referenced as root.logger
if root.game.log: root.logSettings = Logger(root, 'GUI.main')
GUI.updateScreen(root)
if root.game.log: root.logger.info("Screen created")
GUI.createMenu(root)
if root.game.log: root.logger.info("Menu created")
GUI.keyboardBindings(root)
if root.game.log: root.logger.info("Keyboard bindings created")
root.mainloop()