[Zope] Python formatting question

Jonathan dev101 at magma.ca
Thu Jul 21 12:25:43 EDT 2005


----- Original Message ----- 
From: <hpinson at indepthl.com>
To: <zope at zope.org>
Sent: Thursday, July 21, 2005 12:14 PM
Subject: [Zope] Python formatting question


> In a Python script, how can I break up a SQL statement over more than
> one line?  For example, to transform
>
> #generate the sql statement
> sql="DELETE FROM tblUsers WHERE user_name LIKE '%'"
>
> to:
>
> #generate the sql statement
> sql="DELETE FROM tblUsers
>       WHERE user_name LIKE '%'"
>
> ...does not work. Is there a way to break lines?

in python you can continue a logical line over several physical lines by 
placing a '\' character in the last position of the line you want continued.


jh 




More information about the Zope mailing list