本文整理汇总了Python中actions.Actions.do方法的典型用法代码示例。如果您正苦于以下问题:Python Actions.do方法的具体用法?Python Actions.do怎么用?Python Actions.do使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actions.Actions
的用法示例。
在下文中一共展示了Actions.do方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Point
# 需要导入模块: from actions import Actions [as 别名]
# 或者: from actions.Actions import do [as 别名]
elif KEYUP == event.type:
if K_g == event.key:
model = model.update_position( Point( 0, 0, 0 ) )
elif K_i == event.key:
mode = Mode.INSERT
elif K_u == event.key:
if actions.can_undo():
actions.undo()
elif K_r == event.key:
if actions.can_redo():
actions.redo()
elif K_ESCAPE == event.key:
mode = Mode.COMMAND
elif len( objects ) > 0 and K_RETURN == event.key:
actions.do( \
( objects[ -1 ].close, [] ), \
( objects[ -1 ].open, [] ) \
)
elif K_o == event.key: mode = Mode.OBSERVE
elif K_v == event.key: mode = Mode.VISUAL
if K_COLON | KMOD_SHIFT == event.key and Mode.COMMAND == mode:
command = enter_command( screen )
if Command.EDIT == command[ 0 ]:
filename = command[ 1 ][ 0 ]
if not filename.endswith( '.3d' ):
filename += '.3d'
if os.path.exists( filename ):
if os.path.isfile( filename ):
objects = load_objects( filename )
print "Loaded '" + filename + "'"
else:
print "'" + filename + "' is not a file"