Hi,
Is there a help command for documentation within the jython shell which would dump the help for commands such as buildWindow?
print dumpObj(buidWindow) is directed toward information programmer could use, buildWindow.__doc__ does not return any useful documentation for a user.
The only way to get the documentation is to search in the help window. It is much quicker to type help(buildWindow) or something like that.
Joleen
Help command in jython shell
Re: Help command in jython shell
Hi Joleen -
From Jon B, 'help' might never work for java code (at least with the current Jython Shell), so your approach of 'print buildWindow.__doc__' is the way to go for documentation. Some functions currently have better docstrings than others. As you noted, buildWindow doesn't have a very good docstring, but we can improve this. There are other functions that do currently have good doc, such as openBundle and getADDEImage.
To get help for methods, such as annotate and setViewpoint, you can run: print _Display.annotate.__doc__ and print _Display.setViewpoint.__doc__. Another approach to this would be:
We have created Inquiry 1780 to add docstrings to every function/method in McIDAS-V.
Thanks -
Bob Carp
From Jon B, 'help' might never work for java code (at least with the current Jython Shell), so your approach of 'print buildWindow.__doc__' is the way to go for documentation. Some functions currently have better docstrings than others. As you noted, buildWindow doesn't have a very good docstring, but we can improve this. There are other functions that do currently have good doc, such as openBundle and getADDEImage.
To get help for methods, such as annotate and setViewpoint, you can run: print _Display.annotate.__doc__ and print _Display.setViewpoint.__doc__. Another approach to this would be:
Code: Select all
d = activeDisplay()
print d.__doc__ # if _Display had a docstring (it needs one)
print d.annotate.__doc__
# and so on
We have created Inquiry 1780 to add docstrings to every function/method in McIDAS-V.
Thanks -
Bob Carp