本文整理汇总了Python中options.Options.lower方法的典型用法代码示例。如果您正苦于以下问题:Python Options.lower方法的具体用法?Python Options.lower怎么用?Python Options.lower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类options.Options
的用法示例。
在下文中一共展示了Options.lower方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find_log_file
# 需要导入模块: from options import Options [as 别名]
# 或者: from options.Options import lower [as 别名]
def find_log_file(self, wdir_prefix=".."):
"""
Try to find the game log file
Returns a string path, or None if we couldn't find it
"""
logfile_location = ""
version_path_fragment = Options().game_version
if version_path_fragment == "Antibirth":
version_path_fragment = "Rebirth"
if platform.system() == "Windows":
logfile_location = os.environ['USERPROFILE'] + '/Documents/My Games/Binding of Isaac {}/'
elif platform.system() == "Linux":
logfile_location = os.getenv('XDG_DATA_HOME',
os.path.expanduser('~') + '/.local/share') + '/binding of isaac {}/'
version_path_fragment = version_path_fragment.lower()
elif platform.system() == "Darwin":
logfile_location = os.path.expanduser('~') + '/Library/Application Support/Binding of Isaac {}/'
logfile_location = logfile_location.format(version_path_fragment)
for check in (wdir_prefix + '../log.txt', logfile_location + 'log.txt'):
if os.path.isfile(check):
return check
self.log.error("Couldn't find log.txt in " + logfile_location)
return None