当前位置: 首页>>代码示例>>Python>>正文


Python Paths.abspath方法代码示例

本文整理汇总了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)
     ]
开发者ID:andrew-c-esp,项目名称:Flow123d-python-utils,代码行数:10,代码来源:file_comparison.py

示例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),
     ]
开发者ID:jbrezmorf,项目名称:flow123d,代码行数:12,代码来源:file_comparison.py

示例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)
开发者ID:jbrezmorf,项目名称:flow123d,代码行数:17,代码来源:collector.py

示例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()
开发者ID:andrew-c-esp,项目名称:Flow123d-python-utils,代码行数:20,代码来源:monitors.py

示例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"
开发者ID:jbrezmorf,项目名称:flow123d,代码行数:8,代码来源:artifacts.py


注:本文中的scripts.core.base.Paths.abspath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。