Email RE: [Python-projects] Re: FW: PyLint 0.6 bug

from
subject
RE: [Python-projects] Re: FW: PyLint 0.6 bug
date
2005/01/21 12:51
Hi Sylvain. 

I discovered the problem.

File common/astng/manager.py in line 160 does not test for files .pyd (in
windows qt is defined as a .pyd dll and not as .dll)

I saw that in the manager you do some tests about source vs. compiled exts.
You should note that in windows, some people use extensions .pyw (I know, I
think it's strange too)

[]s

Fabio Zadrozny
------------------------------------------------------
Software Developer
ESSS - Engineering Simulation and Scientific Software
www.esss.com.br


-----Original Message-----
From: Meding, Olaf [mailto:Olaf.Meding@bruker-axs.com] 
Sent: sexta-feira, 21 de janeiro de 2005 11:51
To: Sylvain Thénault; Fabio Zadrozny
Cc: python-projects@logilab.org
Subject: RE: [Python-projects] Re: FW: PyLint 0.6 bug


> from qt import *

I can not use PyLint because I am using Python 2.2.1 (we are working on
upgrading).  However we use Qt extensively.  We also use PyChecker, which
works great!  However, PyChecker has problems with "from qt import *" (lots
of bogus warnings).  This form of the import statement is bad style anyway
because it imports anything.  A much cleaner way is to use "import qt".
This makes clear what is used from the qt module.

Now my question, does PyLint work with Qt?  Thanks.

Olaf


-----Original Message-----
From: python-projects-bounces@lists.logilab.org
[mailto:python-projects-bounces@lists.logilab.org]On Behalf Of Sylvain
Thénault
Sent: Friday, January 21, 2005 7:44 AM
To: Fabio Zadrozny
Cc: python-projects@logilab.org
Subject: [Python-projects] Re: FW: PyLint 0.6 bug


On Friday 21 January à 11:39, Fabio Zadrozny wrote:
> Hi Sylvain, remember me?

Hi Fabio
 
> I just updated to version 0.6, but I'm still unable to use it.

> E.g. If I have the code below:

> from qt import *

> class C(QWidget):pass
>     

>  
> I'm getting the traceback posted below.

> The thing is qt is actually defined as a dll 
> (C:\bin\Python23\Lib\site-packages\qt.pyd), so, there is no way you 
> could get its ast (you MUST import it to get its tokens) - I had the 
> same problem for doing code completion for the pydev editor. I based 
> my solution on having the concept of an AbstractModule (that had the 
> logic exposed), CompiledModule and SourceModule... (maybe you can also 
> work on that idea), as for you (I believe) you just want compiled 
> module tokens to see if they exist and not anything else.

Actually yes, I've to import compiled modules to inspect them. But that's
just the way the ast is builded which changes, usually pylint doesn't have
to know about it.

> I believe this would happen using any compiled module, but have not 
> tested for others...

Hum, did you update common libraries too ? Your sample code is correctly
analyzed on my [linux] computer.

-- 
Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects


is a reply to
has reply