本文整理汇总了Python中pp_medialist.MediaList.save_list方法的典型用法代码示例。如果您正苦于以下问题:Python MediaList.save_list方法的具体用法?Python MediaList.save_list怎么用?Python MediaList.save_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pp_medialist.MediaList
的用法示例。
在下文中一共展示了MediaList.save_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import save_list [as 别名]
#.........这里部分代码省略.........
def new_radiobuttonshow_profile(self):
profile = self.pp_dir+"/pp_home/pp_profiles/ppt_radiobuttonshow"
self.new_profile(profile)
def new_hyperlinkshow_profile(self):
profile = self.pp_dir+"/pp_home/pp_profiles/ppt_hyperlinkshow"
self.new_profile(profile)
# ***************************************
# Shows
# ***************************************
def open_showlist(self,dir):
showlist_file = dir + os.sep + "pp_showlist.json"
if os.path.exists(showlist_file)==False:
self.mon.err(self,"showlist file not found at " + dir + "\n\nHint: Have you opened the profile directory?")
self.app_exit()
self.current_showlist=ShowList()
self.current_showlist.open_json(showlist_file)
if float(self.current_showlist.sissue())<float(self.editor_issue) or (self.command_options['forceupdate'] == True and float(self.current_showlist.sissue())==float(self.editor_issue)):
self.update_profile()
self.mon.err(self,"Version of profile has been updated to "+self.editor_issue+", please re-open")
return False
if float(self.current_showlist.sissue())>float(self.editor_issue):
self.mon.err(self,"Version of profile is greater than editor, must exit")
self.app_exit()
self.refresh_shows_display()
return True
def save_showlist(self,dir):
if self.current_showlist<>None:
showlist_file = dir + os.sep + "pp_showlist.json"
self.current_showlist.save_list(showlist_file)
def add_eventshow(self):
self.add_show(PPdefinitions.new_shows['eventshow'])
def add_mediashow(self):
self.add_show(PPdefinitions.new_shows['mediashow'])
def add_liveshow(self):
self.add_show(PPdefinitions.new_shows['liveshow'])
def add_radiobuttonshow(self):
self.add_show(PPdefinitions.new_shows['radiobuttonshow'])
def add_hyperlinkshow(self):
self.add_show(PPdefinitions.new_shows['hyperlinkshow'])
def add_menu(self):
self.add_show(PPdefinitions.new_shows['menu'])
def add_start(self):
self.add_show(PPdefinitions.new_shows['start'])
def add_show(self,default):
# append it to the showlist and then add the medialist
if self.current_showlist<>None:
d = Edit1Dialog(self.root,"AddShow",
"Show Reference", "")
if d.result == None:
return
name=str(d.result)
if name=="":
示例2: PPWebEditor
# 需要导入模块: from pp_medialist import MediaList [as 别名]
# 或者: from pp_medialist.MediaList import save_list [as 别名]
#.........这里部分代码省略.........
self.new_profile(profile)
def new_hyperlinkshow_profile(self):
profile = self.editor_dir+os.sep+'pp_resources'+os.sep+'pp_templates'+os.sep + 'ppt_hyperlinkshow_1p3'
self.new_profile(profile)
# ***************************************
# Shows
# ***************************************
# !!!!! changed app_exit to return
def open_showlist(self,profile_dir):
showlist_file = profile_dir + os.sep + "pp_showlist.json"
if os.path.exists(showlist_file) is False:
OKDialog('Open Profile',"showlist file not found at " + profile_dir + "<br><br>Hint: Have you opened the profile directory?").show(self)
return False
self.current_showlist=ShowList()
self.current_showlist.open_json(showlist_file)
if float(self.current_showlist.sissue())<float(self.editor_issue):
self.update_profile()
OKDialog('Open Profile',"Version of profile has been updated to "+self.editor_issue+", please re-open").show(self)
return False
if float(self.current_showlist.sissue())>float(self.editor_issue):
OKDialog('Open Profile',"Version of profile is greater than editor").show(self)
return False
self.refresh_shows_display()
return True
def save_showlist(self,showlist_dir):
if self.current_showlist is not None:
showlist_file = showlist_dir + os.sep + "pp_showlist.json"
self.current_showlist.save_list(showlist_file)
def add_mediashow(self):
self.add_show(PPdefinitions.new_shows['mediashow'])
def add_liveshow(self):
self.add_show(PPdefinitions.new_shows['liveshow'])
def add_radiobuttonshow(self):
self.add_show(PPdefinitions.new_shows['radiobuttonshow'])
def add_hyperlinkshow(self):
self.add_show(PPdefinitions.new_shows['hyperlinkshow'])
def add_artliveshow(self):
self.add_show(PPdefinitions.new_shows['artliveshow'])
def add_artmediashow(self):
self.add_show(PPdefinitions.new_shows['artmediashow'])
def add_menushow(self):
self.add_show(PPdefinitions.new_shows['menu'])
def add_start(self):
self.add_show(PPdefinitions.new_shows['start'])
def add_show(self,default):
# append it to the showlist and then add the medialist
if self.current_showlist is not None:
self.default_show=default
d = gui.InputDialog("Add Show","Show Reference",width=400,height=250)
d.set_on_confirm_value_listener(self, 'add_show_confirm')