我正在尝试使用subprocess.call从docker容器内的python脚本进行的whois调用捕获输出。我尝试使用Popen和check_output,但是它们会引发错误。这是代码:
import glob
files = glob.glob(r'my_dir/trj_00*/file.txt')
blackList = ['trj0005', 'trj0009', 'trj0011', 'trj0056', 'trj0083']
files = [f for f in files if all(bl not in f for bl in blackList)]
print(files)