how should i readout data from shell to python script variables.. ?

process = subprocess.Popen("rsh botham 'ps -eo fname | grep sublime'",shell=True, stdout=subprocess.PIPE)
process2= subprocess.Popen('hostname')

Docs maybe?
Or I did not understand the question.

well i have been trying this on CentOS on tsch but not getting anything into the variable output

import subprocess

process = subprocess.Popen("rsh botham 'ps -eo fname | grep sublime'",shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
pid =
print pid

xlp = process.poll()
output, error = process.communicate()
print output, xlp

Is there an output if you run the command in a terminal (independently of python) ?

yes the output doesnt prints anything but the line 3 outputs sublime_ twice because sublime is running twice on machine name botham