本文整理汇总了Python中MapList.MapList.get_by_window方法的典型用法代码示例。如果您正苦于以下问题:Python MapList.get_by_window方法的具体用法?Python MapList.get_by_window怎么用?Python MapList.get_by_window使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapList.MapList
的用法示例。
在下文中一共展示了MapList.get_by_window方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: remove_map_cb
# 需要导入模块: from MapList import MapList [as 别名]
# 或者: from MapList.MapList import get_by_window [as 别名]
def remove_map_cb (self, mobj, a):
map = MapList.get_by_window(mobj)
if map:
MapList.delete(map)
self.view.emit ('cursor-changed')
return
raise "Cant remove map of window %s" % mobj
示例2: file_save_cb
# 需要导入模块: from MapList import MapList [as 别名]
# 或者: from MapList.MapList import get_by_window [as 别名]
def file_save_cb (self, mobj, new_fname, mobj1):
map = MapList.get_by_window(mobj)
if map:
map.window = None
map.filename = new_fname
return
示例3: map_title_cb
# 需要导入模块: from MapList import MapList [as 别名]
# 或者: from MapList.MapList import get_by_window [as 别名]
def map_title_cb (self, mobj, new_title, mobj1):
map = MapList.get_by_window(mobj)
if not map:
raise AttributeError ("What a mess, can't find the map")
map.title = new_title