本文整理汇总了Python中Theme.write方法的典型用法代码示例。如果您正苦于以下问题:Python Theme.write方法的具体用法?Python Theme.write怎么用?Python Theme.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Theme
的用法示例。
在下文中一共展示了Theme.write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: debugOut
# 需要导入模块: import Theme [as 别名]
# 或者: from Theme import write [as 别名]
def debugOut(self, engine):
f = open("debug.txt", "w+")
version = Version.version()
currentDir = os.getcwd()
dataDir = Version.dataPath()
translationDir = dataDir + "/translations"
modsDir = dataDir + "/mods"
f.write("Date = %s\n" % datetime.datetime.now())
f.write("\nVersion = %s\n" % version)
f.write("\nOS = %s\n" % os.name)
f.write("\nCurrent Directory = %s\n" % currentDir)
self.directoryList(f, currentDir)
f.write("\nData Directory = %s\n" % dataDir)
self.directoryList(f, dataDir)
f.write("\nLibrary.zip\n")
zip = zipfile.ZipFile(dataDir + "/library.zip", 'r')
for info in zip.infolist():
fileName = info.filename
fileCSize = info.compress_size
fileSize = info.file_size
fileDate = datetime.datetime(*(info.date_time))
f.write("%s, %s, %s, %s\n" % (fileName, fileCSize, fileSize, fileDate))
f.write("\nTranslation Directory = %s\n" % translationDir)
self.directoryList(f, translationDir)
f.write("\nMods Directory = %s\n" % modsDir)
self.directoryList(f, modsDir)
mods = os.listdir(modsDir)
for mod in mods:
modDir = os.path.join(modsDir, mod)
if os.path.isdir(modDir):
f.write("\nMod Directory = %s\n" % modDir)
self.directoryList(f, modDir)
f.write("\nFretsonfire.ini\n")
engine.config.config.write(f)
f.write("\nTheme.ini\n")
Theme.write(f, engine.config)
f.write("\nStage.ini\n")
stage = Stage.Stage(self, self.engine.resource.fileName("stage.ini"))
stage.config.write(f)
f.close()