[Tutor] Eclipse and Member Function Availability
Gooch, John
John.Gooch at echostar.com
Fri May 27 16:56:49 CEST 2005
I am building a class and using a "main.py" script as the "driver" for
testing. Where I am having problems is that the class is defined in another
file ( say the class is "MyClass" and the file is "MyClass.py" that I am
importing as a module. The problem itself ( not a major one ), is that when
using autocomplete feature within Eclipse, where you type in the name of the
module or a class and it lists the functions/variables that are available in
a popup menu, it only shows the modules methods and variables. Hopefully
this example will make things clear:
--------------
import MyClass
def main():
myObject = MyClass.MyClass
""" Here I type in the name of the class, expecting a list of the
classes member functions/etc to popup """
myObject. """<--- here I see a list of functions available to the
module, not the class """
main()
-------------
Now, if I take all of the classes methods out of the class and make them
global within the module file, then I can see all of them using the
autocomplete function, however, doesn't this defeat the purpose of OO?
Should I use a module instead of a class, and pretend the module is a class?
This would make the autocomplete available but make it more difficult to
migrate the code from Python to say, Java or C++.
Any advice is welcome.
Thank You,
John A. Gooch
Systems Administrator
IT - Tools
EchoStar Satellite L.L.C.
9601 S. Meridian Blvd.
Englewood, CO 80112
Desk: 720-514-5708
More information about the Tutor
mailing list