_subprocess_runner.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:subprocrunner 作者: thombashi 项目源码 文件源码
def __init__(self, command, ignore_stderr_regexp=None, dry_run=None):
        if typepy.type.List(command).is_type():
            # concatenate command arguments to create a command if the command
            # argument is list.
            command = " ".join(command)

        self.__command = command
        if dry_run is not None:
            self.__dry_run = dry_run
        else:
            self.__dry_run = self.default_is_dry_run
        self.__stdout = None
        self.__stderr = None
        self.__returncode = None

        self.__ignore_stderr_regexp = ignore_stderr_regexp
        self.__debug_logging_method = self.__get_logging_method(logbook.DEBUG)
        self.error_log_level = self.default_error_log_level

        if self.is_save_history:
            if len(self.__command_history) >= self.history_size:
                self.__command_history.pop(0)

            self.__command_history.append(command)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号