Il Wed, 23 Jul 2008 01:19:48 -0700, karthikbalaguru ha scritto: > Hi, > > I am new to python, Kindly suggest to resolve a problem with a python > file. > What does the below error refer to ? > I use Redhat 9.0, python-2.2.2-26, python-devel-2.2.2-26 and > db4-4.0.14-20. > > [EMAIL PROTECTED] processor]# Analyzer processorcycle > /usr/local/SDK/bin/../core/bin/processorlib.py:8 8: Warning: 'yield' > will become a reserved keyword in the future Traceback (most recent call > last): > File "/usr/local/SDK/bin/Analyzer", line 48, in ? > from debuglib import ProcessorInfo > File "/usr/local/SDK/bin/../core/bin/processorlib.py", line 88 > yield ProcessorObjectInfo(child, self.pt) > ^ > SyntaxError: invalid syntax > > Is this error related with the version of python / python-devel that i > use .
Yes. Generators (and thus the yield keyword) are not available in python 2.2. > Any ideas / tips ? > First try doing: from __future__ import generators. In __future__ package you can find the features which are to become standard in the next releases. I don't remember when the generators have been introduced but maybe you will be lucky. Otherwhise install a newer version of python. You can probably do it without replacing the one you have, but I'm not using RH and I can't thell you how. > Thx in advans, > Karthik Balaguru Ciao ----- FB -- http://mail.python.org/mailman/listinfo/python-list