[Python-projects] __init__ method from a non direct base class <logilab.astng.Yes object at 0xb7f8392c> is called
Alexandre Fayolle
alexandre.fayolle at logilab.fr
Tue Nov 21 11:46:06 CET 2006
On Mon, Nov 20, 2006 at 11:18:57AM -0600, skip at pobox.com wrote:
>
> >> I found a email to this list in august from Skip Montano reporting
> >> the problem. Give that pylint is unusable with this bug in place I'm
> >> surprised that the lastest released kit contains this show stopper
> >> bug.
>
> Alexandre> If you read the recent archives you will see that this has
> Alexandre> been discussed, and it looks like it is a pygtk issue.
>
> My problem seems to be related to our use of the pygtk module to extend
> sys.path to refer to the relevant version of gtk. For example, our code
> contains:
>
> import pygtk
> pygtk.require("2.6")
>
> import gobject
>
> The pygtk.require() call adds our gtk 2.6 installation directory to
> sys.path.
<snip>
> module and rummage around in it. There is no gobject module in the default
> sys.path in our environment. I'm not sure how pylint could improve in this
> regard without actually importing the module/script.
A way of achieving this could be adding a hook that would be run when
pylint starts, in order to ease sys.path manipulation. Usage example:
pylint --init-hook='import pygtk; pygtk.require("2.6")' [other options] mymodule
We could also consider having a few shortcuts for some common cases,
such as --with-pygtk=2.6, if there is demand for this.
Sylvain, what is your opinion on this?
--
Alexandre Fayolle LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
Informatique scientifique: http://www.logilab.fr/science
Reprise et maintenance de sites CPS: http://www.migration-cms.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20061121/b96f951b/attachment-0001.pgp
More information about the Python-Projects
mailing list