Arrgh! Please help.

Fredrik Lundh effbot at telia.com
Sat May 13 22:20:49 EDT 2000


<chibaA at TinterlogD.Tcom> wrote:
> I'm pulling my hair out as to why I get this error:

it just means that value isn't a string.  

to figure out what value happens to be, try adding
the following debug statement:

> For this code: 
> if 1:
>         print "Content-Type: text/html\n\n"
>         print "whatever",
>         oL = ""
>         for key,value in rv.items():
                  print type(value)
>                 oL = oL + value + "&" + "blah"
>         print "blah",
>         print "=",
>         print oL

...

> And while I'm at it, is there any way to use consecutive print
> statements, and NOT have spaces in the output? ( I know comma gets rid
> of the \n, but not the spaces).

how about:

import sys
write = sys.stdout.write

write("sp")
write("am")

</F>

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->




More information about the Python-list mailing list