By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,689 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,689 IT Pros & Developers. It's quick & easy.

Strange problem ....

P: n/a
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.

[root@localhost 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 .
Any ideas / tips ?

Thx in advans,
Karthik Balaguru
Jul 23 '08 #1
Share this Question
Share on Google+
2 Replies

P: n/a
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.

[root@localhost 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
Jul 23 '08 #2

P: n/a
karthikbalaguru wrote:
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.

[root@localhost 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 .
Any ideas / tips ?
I asked you yesterday why you are under the impression that your script is
destined for version 2.2. The above error proves: it is *not*. Why don't
you try running it with the installed version 2.4 or whatever fedora ships?

Diez
Jul 23 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.