Hey, that fixed the problem; thanks Brian. I tried that at the interpreter before, and it didn't help, but in the file it worked perfectly.
--Alex >Message: 5 >Date: Tue, 15 Sep 2009 21:05:04 +0200 >From: Brian King <free.as.in.spe...@gmail.com> >Subject: Re: [Neo] Syntax error when using neo4j.py >To: Neo user discussions <user@lists.neo4j.org> >Message-ID: > <2cc028020909151205m32b108cfxe8e941a9ae114...@mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >Hi Alex, > >try using this line at the top of your python file: > >from __future__ import with_statement > >Brian > >On Tue, Sep 15, 2009 at 7:52 PM, Alex Stuart <dstu...@cs.umn.edu> wrote: >> Hi, >> >> I am attempting to write a Python script to do some basic transactions >> with a Neo4j database. I'm using Jython 2.5rc1 and the latest neo4j.py >> module on Ubuntu 9.04. >> >> When I try to follow the code example on the neo4j.py page, I use the >> "with" statement as it shows: >> >> from neo4j import NeoService >> ? neo = NeoService( "/neo/db/path" ) >> ? with neo.transaction: >> ? ? ? ref_node = neo.reference_node >> ? ? ? new_node = neo.node() >> ? ? ? # put operations that manipulate the node space here ... >> ? neo.shutdown() >> >> >> However, when the "with" statement is parsed, the interpreter stops and >> returns the following syntax error: >> >> Syntax Error: 'with' will become a reserved word in Python 2.6 >> >> I've tried a bunch of different code and searched around for other >> people having this problem, but to no avail. All of my stuff is up to >> date, so why would the basic recommended code break on my system? >> >> --Alex >> >> >> >> _______________________________________________ >> Neo mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user