【发布时间】:2019-12-17 11:08:42
【问题描述】:
在我看到问题的文件之一中:
"TypeError: a bytes-like object is required, not 'str'"
代码sn-p:
def run_process(self, cmd):
sh = self.is_win()
child = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=sh)
output = child.communicate()[0].strip().split('\n')
return output, child.returncode
【问题讨论】:
标签: python python-3.x python-2to3