"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> To really get a picture of what is coming out of the DB I had the
> program print out everything about this string using this code:
>     print code
>     print repr(code)
>     print type(code)
>     for char in code:
>         print ord(char),char
> 
> To which I got:
> 
> print 'greg' print 'greg2'
> "print 'greg'\r\nprint 'greg2'"

>>> exec "1\n2"
>>> exec "1\r\n2"

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    exec "1\r\n2"
  File "<string>", line 1
    1
    
^
SyntaxError: invalid syntax
>>> 

Get rid of the carriage return.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to