> > I am trying to find a way from which I could redirect standard output to a > variable. You can redirect stdout and stderr to a file. Check out the following section from Dive into Python, that has sample code: http://www.diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html Ramaswamy