本文整理汇总了Python中xierpa3.toolbox.transformer.TX.class2Path方法的典型用法代码示例。如果您正苦于以下问题:Python TX.class2Path方法的具体用法?Python TX.class2Path怎么用?Python TX.class2Path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xierpa3.toolbox.transformer.TX
的用法示例。
在下文中一共展示了TX.class2Path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getFilePath
# 需要导入模块: from xierpa3.toolbox.transformer import TX [as 别名]
# 或者: from xierpa3.toolbox.transformer.TX import class2Path [as 别名]
def getFilePath(self, site):
u"""
Answers the file path, based on the URL. Add '/files' to hide Python sources from view.
The right 2 slash-parts of the site path are taken for the output (@@@ for now)
"""
if site.e is not None:
return TX.class2Path(site) + "/files/" + "/".join(site.e.path.split("/")[-2:])
return None
示例2: getFilePath
# 需要导入模块: from xierpa3.toolbox.transformer import TX [as 别名]
# 或者: from xierpa3.toolbox.transformer.TX import class2Path [as 别名]
def getFilePath(self, site):
u"""
Answers the file path, based on the URL. Add '/files' to hide Python sources from view.
"""
fileName = site.e.path.split('/')[-1:]
if fileName:
fileName = '/'.join(file)
else:
fileName = 'index'
return TX.class2Path(site) + '/files/' + fileName