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


Python FileAccess.delete方法代码示例

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


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

示例1: DeleteSettings2

# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import delete [as 别名]
def DeleteSettings2():
    log('utilities: DeleteSettings2')
    ClearChanFavorites(False)
    if FileAccess.exists(SETTINGS_FLE):
        if yesnoDialog("Delete Current Channel Configurations?"):
            try:
                REAL_SETTINGS.setSetting("Config","")
                REAL_SETTINGS.setSetting("CurrentChannel","1")
                FileAccess.delete(SETTINGS_FLE)
                infoDialog("Channel Configurations Cleared")
            except:
                pass           
    # Return to PTVL Settings
    REAL_SETTINGS.openSettings()
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:16,代码来源:utilities.py

示例2: downloadSkin

# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import delete [as 别名]
 def downloadSkin(self, selSkin):
     self.log("downloadSkin")
     url = self.SkinPanel.getSelectedItem().getProperty('PTVL.SKINZIP')
     dl = os.path.join(PTVL_SKIN_LOC,'%s.zip'%selSkin)
     try:
         print url, dl
         download(url, dl, '')
         all(dl, os.path.join(PTVL_SKIN_LOC,''),True)
         try:
             FileAccess.delete(dl)
         except:
             pass
         return True
     except:
         return False
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:17,代码来源:skin.py

示例3: makeXMLTV

# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import delete [as 别名]
 def makeXMLTV(self, data, filepath):
     self.log('makeXMLTV')
     finished = False
     if not FileAccess.exists(os.path.dirname(filepath)):
         FileAccess.mkdir(os.path.dirname(filepath))
     if FileAccess.exists(filepath):
         FileAccess.delete(filepath)
     fle = open(filepath, "w")
     try:
         xml = data.toxml(encoding='UTF-8');
         log('writing item: %s' % (filepath))
         if FileAccess.exists(filepath):
             finished = True
     except Exception as e:
         xml  = '<?xml version="1.0" encoding="UTF-8"?>'
         xml += '<error>' + str(e) + '</error>';
     xmllst = xml.replace('><','>\n<')
     xmllst = self.cleanChanName(xmllst)
     fle.write("%s" % xmllst)
     fle.close()
     return finished
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:23,代码来源:ustvnow.py


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