On Linux, the command ps aux outputs a list of processes with multiple columns for each stat. e.g.
USER PID %CPU %MEM VSZ RSS TTY STAT START
Check out the python.psutils package.
psutil.process_iter
returns a generator which you can use to iterate over all processes.
p.cmdline
is a list of each Process object's cmdline arguments, separated just the way you want.
You can create a dictionary of pids vs (pid,cmdline,path)
with just one line and then use it anyway you want.
pid_dict = dict([(p.pid, dict([('pid',p.pid), ('cmdline',p.cmdline), ('path',p.path)]))
for p in psutil.process_iter()]))