本文整理汇总了Python中scripts.core.base.Paths.abspath方法的典型用法代码示例。如果您正苦于以下问题:Python Paths.abspath方法的具体用法?Python Paths.abspath怎么用?Python Paths.abspath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scripts.core.base.Paths
的用法示例。
在下文中一共展示了Paths.abspath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_command
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import abspath [as 别名]
def get_command(f1, f2, **details):
return [
Paths.ndiff(),
'-r', str(details.get('r_tol', '100.01')),
'-a', str(details.get('a_tol', '100.0001')),
Paths.abspath(f1),
Paths.abspath(f2)
]
示例2: get_command
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import abspath [as 别名]
def get_command(f1, f2, **details):
return [
Paths.ndiff(),
"-r",
str(details.get("r_tol", "0.01")),
"-a",
str(details.get("a_tol", "0.0001")),
Paths.abspath(f1),
Paths.abspath(f2),
]
示例3: __iter__
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import abspath [as 别名]
def __iter__(self):
fileset = formic.FileSet(self.includes, directory=self.source)
for filename in fileset:
name = Paths.basename(filename) if not self.name else self.name.format(
path=self.create_path_dict(filename),
name=Paths.basename(filename),
)
if self.flat:
root = self.target
else:
rel_path = Paths.relpath(Paths.dirname(filename), Paths.abspath(self.source))
root = Paths.abspath(Paths.join(self.target, rel_path))
yield CopyRule(filename, Paths.join(root, name), self.remove_original)
示例4: on_complete
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import abspath [as 别名]
def on_complete(self, pypy=None):
if self.pypy.returncode > 0:
if self.message:
Printer.separator()
Printer.open()
Printer.out(self.message)
else:
Printer.open()
# if file pointer exist try to read errors and outputs
output = self.pypy.executor.output.read()
if output:
if self.pypy.full_output:
Printer.out('Output (last {} lines, rest in {}): ', self.tail, Paths.abspath(self.pypy.full_output))
else:
Printer.out('Output (last {} lines): ', self.tail)
Printer.err(format_n_lines(output, -self.tail, indent=Printer.indent * ' '))
Printer.close()
示例5: __init__
# 需要导入模块: from scripts.core.base import Paths [as 别名]
# 或者: from scripts.core.base.Paths import abspath [as 别名]
def __init__(self, yaml_file):
self.yaml_file = Paths.abspath(yaml_file)
self.configuration = None
# set default language as english
os.environ["LC_ALL"] = "C"