本文整理汇总了Python中utils.globals.GlobalData.isProjectFile方法的典型用法代码示例。如果您正苦于以下问题:Python GlobalData.isProjectFile方法的具体用法?Python GlobalData.isProjectFile怎么用?Python GlobalData.isProjectFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.globals.GlobalData
的用法示例。
在下文中一共展示了GlobalData.isProjectFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import isProjectFile [as 别名]
def __init__( self, fileName = None, lineNumber = None, condition = "",
temporary = False, enabled = True, ignoreCount = 0 ):
if fileName is None:
self.__fileName = fileName
elif os.path.isabs( fileName ):
project = GlobalData().project
if project.isLoaded():
if project.isProjectFile( fileName ):
# This is a project file; strip the project dir
self.__fileName = fileName.replace( project.getProjectDir(),
"" )
else:
# Not a project file, save as is
self.__fileName = fileName
else:
# Pretty much impossible
self.__fileName = fileName
else:
# Relative path, i.e. a project file
self.__fileName = fileName
self.__lineNumber = lineNumber
self.__condition = condition
self.__temporary = temporary
self.__enabled = enabled
self.__ignoreCount = ignoreCount
return