The following forum message was posted by moguri at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4044299:
I have a module (bge) that only contains submodules (eg, render and logic).
What is the proper way to create pypredef files for these? Currently I have
a bge.pypredef, bge.render.pypredef and bge.logic.pypredef. bge.pypredef only
has imports in it (import render; import logic). Without the imports using "bge."
does nothing. However, the problem is this works (with the imports
[code]from bge import logic
logic.foo # foo auto-completes[/code]
but this doesn't:
bge.logic.foo # logic will auto-complete, but not foo[/code]
I'd like to be able to do the latter. Any thoughts?
The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4044299:
It works as if it was python code, so, as you have different packages, you have
to import the package you're using -- i.e.: you have to add an import at bge
to import the bge.logic package (as you'd need in regular python code).
from bge import logic