Thank you for the quick reply, but still doesn't work. Now it seems the "\n" is executed instead of printed.
 
This is what I get when I print the query:
 
SELECT * FROM blah WHERE (cod = 23
)
 
The code is being executed in an XMLRPC server. Maybe that's the problem? I don't know, but I don't get the \n when I execute str or repr in the python command shell.
 
It's weird...
 
 
 


 
2006/4/6, Wesley Brooks <[EMAIL PROTECTED]>:
Jose Carlos,

str(234) gives '234'

Is that what your after?

Wesley.

On 06/04/06, Jose Carlos Balderas Alberico < [EMAIL PROTECTED]> wrote:
Hello. I'm trying to turn an integer into a string, and the "repr" function doesn't work the way I want.
 
The repr function inserts a '\n' at the end of the string, and I need to get the string representation without the '\n', since I need to insert the stringed data into a sql query.
 
I get "SELECT * FROM blah WHERE(code = 23\n)"
 
I need to get rid of that "\n". Is there any other function I can use to turn an integer into a string without the \n at the end?
 
Thanks for your attention.

 

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

Reply via email to