本文整理匯總了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