En Thu, 21 Jun 2007 12:47:30 -0300, Bala Subramanyam vemu  
<[EMAIL PROTECTED]> escribió:

> It executes fine in the  python shell, but the problem is in when i  
> execute
> as a  python script  i get the following error
>
> DCA-TestMachine:~/python_scripts # python2.5 -v rpmqa.py

> # /root/python_scripts/rpm.pyc matches /root/python_scripts/rpm.py
> import rpm # precompiled from /root/python_scripts/rpm.pyc
> Traceback (most recent call last):
>   File "rpmqa.py", line 1, in <module>
>     import rpm
>   File "/root/python_scripts/rpm.py", line 10, in <module>
>     main()
>   File "/root/python_scripts/rpm.py", line 3, in main
>     tss= rpm.TransactionSet()
> AttributeError: 'module' object has no attribute 'TransactionSet'

You have a rpm.py in your python_scripts directory, and it shadows the  
right one. Rename or delete your rpm.py

> I dont know what path I should set the PYTHONHOME PYTHONPATH .etc..
> variables

Usually, nothing.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to