Python Stdout To String Function Example