[wingide-users] Wing cant import the amara module while ipython can

Michael Bernhard Arp Sørensen michael at arpsorensen.dk
Fri Nov 14 01:25:54 MST 2008


Hi there. Thanks for your reply.

That did not help me or pylint. :-) But I found a workaround.

I opened the egg, which is a zip file, and copyed the folder named "amara"
into the base directory of my source code. After that, pylint imports amara
easely.

Apparantly, a folder with code is regarded as a module IF there's a file in
that folder called __init__.py. I believe I've heard that before somewhere
else.

From what I could find on Google, pylint does not support eggs.

Med venlig hilsen/Kind regards

Michael B. Arp Sørensen
Programmer / BOFH


On Thu, Nov 13, 2008 at 5:25 PM, Wingware Support <support at wingware.com>wrote:

> Michael Bernhard Arp Sørensen wrote:
>
>> This might be a more generic problem. A newly installed python module, for
>> handling XML, cannot be importet when testing with pylint.
>>
>> When I try from the command line, pylint can still not import amara.
>>
>> Ipython, however, can import amara:
>>
>> In [1]: import amara
>>
>> In [2]: amara?
>> Type:           module
>> Base Class:     <type 'module'>
>> String Form:    <module 'amara' from
>> '/usr/lib/python2.5/site-packages/Amara-1.2.0.2-py2.5.egg/amara/__init__.py'>
>> Namespace:      Interactive
>> File:
>> /usr/lib/python2.5/site-packages/Amara-1.2.0.2-py2.5.egg/amara/__init__.py
>> Docstring:
>>    <no docstring>
>>
>>
>> In [3]:
>>
>> Is it a "normal" problem for pylint to import modules?
>>
>> I'm new to pylint and wing.
>>
>
> Pylint does try to find imported modules so it can determine the types of
> values as much as possible.  I suspect it may not be able to see into the
> egg,
> although I'm not sure and don't know that much about pylint's internals.
>
> You may be able to make it work by adding the following directory to
> your Python Path:
>
>
> /usr/lib/python2.5/site-packages/Amara-1.2.0.2-py2.5.egg
>
> --
>
> Stephan Deibel
> Wingware | Python IDE
> Advancing Software Development
>
> www.wingware.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20081114/05a02493/attachment.html


More information about the wingide-users mailing list