Tim beat me to it (I was doing some tests to see what version of Python
this broke on). So the problem is that the symtax
sum(x.weight for x in molLabelFractions)
is Python >= 2.4 specific and for Python 2.3 (and 2.2?) we need:
sum([x.weight for x in molLabelFractions])
Rasmus will probably tell us the former is more efficient, but anyway...
I should add that in a couple of months Analysis will *not* work with
Python < 2.4, and we recommend Python 2.5 now (otherwise you have to
install some other package). I hope OSX 10.3.9 has such a Python
available via Fink.
(Tim, I've checked the fix into the CVS repository.)
Wayne
On Tue, 23 Oct 2007, Tim Stevens wrote:
> > I just applied some updates to analysis and got the following error in
> > their installation
> >
> > File "/sw/ccpnmr/ccpnmr1.0/python/ccp/util/LabeledMolecule.py", line 191
> > molWeightSum = sum(x.weight for x in molLabelFractions)
> > ^
> > SyntaxError: invalid syntax
>
> Looks like your version of Python is slightly too old for some of the
> newer code which is being readied for the next big release. (This syntax
> is fine in the latest versions of Python.)
>
> I have put up a fix which will work with older Python versions.
>
> In the absence of a working Analysis use the following command to get the
> patch:
>
> updateAll
>
> Or failing that:
>
> python /sw/ccpnmr/ccpnmr1.0/python/ccpnmr/update/UpdatePopup.py
>
> T.
>
> -------------------------------------------------------------------------------
> Dr Tim Stevens Email: [log in to unmask]
> Department of Biochemistry [log in to unmask]
> University of Cambridge Phone: +44 1223 766018 (office)
> 80 Tennis Court Road +44 7816 338275 (mobile)
> Old Addenbrooke's Site +44 1223 364613 (home)
> Cambridge CB2 1GA WWWeb: http://www.bio.cam.ac.uk/~tjs23
> United Kingdom http://www.pantonia.co.uk
> -------------------------------------------------------------------------------
> ------
+NH3CH(CH(CH3)OH)C(O)NHCH(CH(CH3)CH2CH3)C(O)NHCH(CH2CH2SCH3)CO2-
-------
> -------------------------------------------------------------------------------
>
|