当前位置: 首页>>代码示例>>Python>>正文


Python Package.save方法代码示例

本文整理汇总了Python中exe.engine.package.Package.save方法的典型用法代码示例。如果您正苦于以下问题:Python Package.save方法的具体用法?Python Package.save怎么用?Python Package.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在exe.engine.package.Package的用法示例。


在下文中一共展示了Package.save方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Saver

# 需要导入模块: from exe.engine.package import Package [as 别名]
# 或者: from exe.engine.package.Package import save [as 别名]
class Saver():

  def __init__(self,outputfilename="prova2.elp",titol="Exportacio de LliureX"):

    self._outputfile = outputfilename
    self._titol = titol

    self.document = Package('LLiureX')

    self.document.set_name('Lliurex')
    self.document.set_description('Lliurex')
    self.document.set_author('Lliurex')
    self.document.set_title('Documentacio LLiurex')

  def addWikipedia(self,title,url,parent):
     W = WikipediaIdeviceLliurex(url)
     W.set_title(title)
     W.edit = False
     W.loadArticle("")
     W.undo = False
     parent.addIdevice(W)

  def save(self):
    self.document.save(self._outputfile)

  def AddNode(self,parent,titol):
    Fill = parent.createChild();
    Fill.setTitle(titol)
    return Fill

  def getRoot(self):
    return self.document.root
开发者ID:fercavi,项目名称:media2elp,代码行数:34,代码来源:saver.py

示例2: handleExtractPackage

# 需要导入模块: from exe.engine.package import Package [as 别名]
# 或者: from exe.engine.package.Package import save [as 别名]
 def handleExtractPackage(self, client, filename):
     """
     Create a new package consisting of the current node and export
     """
     filename  = Path(filename)
     saveDir = filename.dirname()
     if saveDir and not saveDir.exists():
         client.alert(_(u'Cannot access directory named ') +
                      unicode(saveDir) +
                      _(u'. Please use ASCII names.'))
         return
     if not filename.lower().endswith('.elp'):
         filename += '.elp'
     if Path(filename).exists():
         client.alert(_(u'EXPORT FAILED.\n"%s" already exists.\n'
                         'Please try again with '
                         'a different filename') % filename)
         return
     package = Package(filename.namebase)
     package.style  = self.package.style
     package.author = self.package.author
     extractNode  = self.package.currentNode.clone()
     extractNode.mergeIntoPackage(package)
     package.root = package.currentNode = extractNode
     package.save(filename)
     client.alert(_(u'Package saved to: %s' % filename))
开发者ID:,项目名称:,代码行数:28,代码来源:

示例3: __exportIdevice

# 需要导入模块: from exe.engine.package import Package [as 别名]
# 或者: from exe.engine.package.Package import save [as 别名]
 def __exportIdevice(self, filename):
     """
     export the current generic idevices.
     """
     if not filename.endswith(".idp"):
         filename = filename + ".idp"
     name = Path(filename).namebase
     package = Package(name)
     package.idevices.append(self.editorPane.idevice.clone())
     package.save(filename)
开发者ID:tquilian,项目名称:exelearningTest,代码行数:12,代码来源:editorpage.py

示例4: __exportIdevice

# 需要导入模块: from exe.engine.package import Package [as 别名]
# 或者: from exe.engine.package.Package import save [as 别名]
 def __exportIdevice(self, filename):
     """
     export the current generic idevices.
     """
     if not filename.endswith('.idp'):
         filename = filename + '.idp'
     name = Path(filename).namebase
     package = Package(name)
     for idevice in self.ideviceStore.generic:
         package.idevices.append(idevice.clone())                
     package.save(filename)
开发者ID:,项目名称:,代码行数:13,代码来源:

示例5: tick2

# 需要导入模块: from exe.engine.package import Package [as 别名]
# 或者: from exe.engine.package.Package import save [as 别名]
    def tick2(self,package):
	bkup = Package(package.name)
	bkup = Package('bakcup')
	package.root.copyToPackage(bkup)
	bkup.save(package.name+'.bk')
开发者ID:Rafav,项目名称:iteexe,代码行数:7,代码来源:packageredirectpage.py


注:本文中的exe.engine.package.Package.save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。