escribió:
I'm trying to implement autocompletion into my editor.wx is a package. Modules within the package are not, by default,
But I find some weird behavior,
or at least I don't have the faintest idea why this behavior occures,
and even more important how to solve it
In the example below I try to autocomplete " wx.s" , which in my humble
opinion should at least produce "wx.stc" (and some others ).
attributes of the package - unless they're imported in __init__.py or your
code imports them.
So the autocompleter is doing the right thing - wx.stc does not exist
until it is explicitely imported.
pyimport wx
pywx.stc
Traceback (most recent call last):
...
AttributeError: 'module' object has no attribute 'stc'
py'stc' in dir(wx)
False
pyimport wx.stc
pywx.stc
<module 'wx.stc' from '...'>
py'stc' in dir(wx)
True
--
Gabriel Genellina