#!/usr/local/bin/python3 import subprocess; import os; x=open("/tmp/blahblahblah", "w+"); print([subprocess.check_output(['lsof', '-wXFn', '+p', str(pid)]) for pid in range(999)])