@with_device
def proc_exe(pid):
 with context.quiet:
  io = process(['realpath', ('/proc/%d/exe' % pid)])
  data = io.recvall().strip()
 return data

@ with_device def proc_exe ( pid ) : with context . quiet : io = process ( [ 'realpath' , ( '/proc/%d/exe' % pid ) ] ) data = io . recvall ( ) . strip ( ) return data
returns the full path of the executable for the provided pid .