[Python.NET] Class Member completion
Matthew Pontefract
MP at credaris.com
Fri Jun 23 10:07:51 CEST 2006
This sort of code-completion/intellisense behaviour is not a feature of
the language, of course, but a feature of the IDE that you choose to
use. However, the degree of help that can be provided is determined to
some extent by the features of the particular language being programmed.
There are excellent C/C++ IDEs that do all of this, as you know, as
there are for Java (IDEA, Eclipse etc), and these strongly typed and
structured languages make it easy to write very helpful IDEs.
I have found that The PyDev Extensions plug-in for Eclipse
(http://www.fabioz.com/pydev/) to be pretty good in this respect. It is
harder, sometimes, for an IDE to provide suggestions in a dynamic
language, but there is still a great deal that it can do, and Pydev
Extensions do the job pretty well. I know that there are many other IDEs
for Python out there, and all can be used with PythonNet, especially if
you import clr into the CPython-run application.
That said, the specific example you quote is not always easy to do and
so PyDev doesn't really help. Because Python is a dynamic duck-typed
language it is not easy for the IDE to know what class is being dealt
with. Say you pass parameter X to a function. You then type X.<tab> -
*you* may know that X is class TestClass, but the IDE has no way of
determining that: it could be an integer, class FooBar or a list...
until runtime, the system can't be sure except for variables that have
been explicitly initialized within scope at which point PyDev gives you
all the help you need.
Matthew
-----Original Message-----
From: pythondotnet-bounces+mp=credaris.com at python.org
[mailto:pythondotnet-bounces+mp=credaris.com at python.org] On Behalf Of
Srivatsa, Radhika
Sent: 22 June 2006 23:09
To: Brian Lloyd; Bruce Dodson; pythondotnet at python.org
Subject: [Python.NET] Class Member completion
Like in C++, can we have the members of a class to be completed for us
in the case of Python - like for example, if a class 'TestClass' has
been defined with two methods "test1' and "test2" and when I enter
"TestClass.", I'd like to see the possible methods/member variables that
can be used - something like file-name completion (with Tab).
Is this possible for Python classes like C++ classes ?
Thanks
--Radhika
Radhika Srivatsa
UMS Software Development
Voice: (858)618-2235
_________________________________________________
Python.NET mailing list - PythonDotNet at python.org
http://mail.python.org/mailman/listinfo/pythondotnet
More information about the PythonDotNet
mailing list