[Edu-sig] string assignment
engelbert.gruber@ssg.co.at
engelbert.gruber@ssg.co.at
Thu, 14 Nov 2002 07:56:05 +0100 (CET)
On Wed, 13 Nov 2002, Carla Attianese wrote:
> Hi everybody,
> I'm writing a python script that tries to connect to informix DB. I got an error in assigning a SQL Create Table statement to a variable. This is how I did it:
>
> CREATE_STATEMENT_TABLE = """
> CREATE TABLE rdf_statement (......
> .......)
> """
>
>
> This is the error I got:
>
> SyntaxError: invalid syntax
> File "C:\Documents and Settings\carla\a.py", line 258
> CREATE_STATEMENT_TABLE="""
> ^
> I tried with single quote, getting the same error.It seems not to accept an assignment of a string to a variable. I'm using Python 2.1.1 on WIndows XP. Am I doing something wrong with the syntax?
> Thank you and best regards
CREATE_STATEMENT_TABLE = """
CREATE TABLE rdf_statement (
ID int,
name varchar(64)
)
"""
print CREATE_STATEMENT_TABLE
works on linux python 2.0, nt python2.2
--
BINGO: Das muessen wir noch kommunizieren
--- Engelbert Gruber -------+
SSG Fintl,Gruber,Lassnig /
A6410 Telfs Untermarkt 9 /
Tel. ++43-5262-64727 ----+