added process_output for python 2.6