def get_process_info (): # This seems to work on both Linux and BSD, but should otherwise be considered highly UNportable. ps = pexpect.run ('ps ax -O ppid') pass