capturing print_stats() output in a StringIO object for passing off to a pythonic gnuplot implementation