Redirecting STDOUT to a Python Variable

James Mills prologic at shortcircuit.net.au
Tue Jun 22 02:51:10 EDT 2010


On Tue, Jun 22, 2010 at 4:10 PM, Anthony Papillion <papillion at gmail.com> wrote:
> I'm writing an application that uses the Google Storage Python
> library.  When an error occurs, the error is printed on the terminal.
> What I need to do is intercept that text into a variable so I can run
> a re.search() against it and find out what's going on.

I'm not familiar with this library (either), however you
would be better off digging through it's documentation
and/or it's sources and find out how to change where it logs
errors to.

--James

-- 
--
-- "Problems are solved by method"



More information about the Python-list mailing list