On Feb 28, Peter Otten wrote:

> Are you using Python 2.x? Then you cannot redefine print. Instead you have
> to redirect stdout. The following example should run as a cgi script:
>
> #!/usr/bin/env python
> import cgi
> import sys
> from cStringIO import StringIO
...

That works! Except for Py3 I had to say:

from io import StringIO

Thanks.

-- Gnarlie
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to