W3C home > Mailing lists > Public > public-cwm-talk@w3.org > October to December 2006

Re: cwm on Python 2.5?

From: Daniel Krech <eikeon@eikeon.com>
Date: Mon, 9 Oct 2006 12:04:33 -0400
Message-Id: <87317DDA-2B76-4ACB-BAFF-ACA65E1F07B6@eikeon.com>
Cc: public-cwm-talk@w3.org
To: Yarden Katz <yarden@umd.edu>

On Oct 6, 2006, at 4:07 PM, Yarden Katz wrote:

>
> Hi,
>
>   I'm pretty sure I'm doing something wrong here, but thought I'd  
> report if it's a bug: I am using the latest release (not svn) of  
> cwm on Python 2.5 (mac os x) and got the following error..
>
> File "/Library/Frameworks/Python.framework/Versions/Current/lib/ 
> python2.5/site-packages/swap/formula.py", line 26
>     from __future__ import generators
> SyntaxError: from __future__ imports must occur at the beginning of  
> the file
>
>   In formula.py, the __future__ line really isn't at the beginning  
> (two variables are initialized before it).  If I move it to the  
> start of the file, it runs.

I've run into the same thing in rdflib. Python2.5 is more strict than  
Python2.4 about the from __future__ bit being at the very beginning  
of the files. Moving it to the very beginning will do the job.

> thanks, --Yarden
> --
> Yarden Katz <yarden@umd.edu>
>

Daniel Krech, http://eikeon.com/
Received on Monday, 9 October 2006 16:04:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:02 GMT