|
Depends what you want
to find out. The easy way is using dir and __doc__: import sys dir(sys) dir(obj) lists
attributes available on the given object dir() lists contents
of global namespace __doc__ provides
documentation, if any: >>> import
first >>>
first.add.__doc__ 'add(a, b) ->
returns a + b' However, IronPython only
provides some information… Consider: IronPython: >>> print
pow.__doc__ static object
pow(object x, object y) static object
pow(object x, object y, object z) CPython: >>> print
pow.__doc__ pow(x, y[, z]) ->
number With two arguments,
equivalent to x**y. With three arguments, equivalent to (x**y)
% z, but may be more efficient (e.g. for longs). I find the CPython
help extremely useful when it comes to questions on built-in modules or functions,
language definition etc. Hope this helps. Martin From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabio Thank you, Martin. Worked very fine! Do you know if have some command to obatin help about the commands?
like in DOS we can use DIR /? Regards Fabio 2006/1/7, Martin Maly <[EMAIL PROTECTED]>:
Hi Fabio, The tutorial is meant to be ran from the
Tutorial directory (there are 2 batch files to execute the IronPythonConsole
from there) Other option is to add the Tutorial directory
to your sys.path: >>> import sys >>> sys.path.append(sys.prefix +
"\\Tutorial") >>> import first Since the tutorial is designed to work from
the tutorial directory, I'd recommend using the batch files to start the
console. This way, IronPython will run in the correct directory and import
lookup paths will be set correctly. Martin From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Fabio I'm new
in python (and IronPython). I have
used the tutorial of IronPython 1.0 Beta, and when I "import
first" I receive this error: >>>
import first I think
what I need set some like import "Tutorial\first" but I know not the
syntax... Someone
can help? PS: How I
do to in console get help about any command? Thanks
for all! Fabio
|
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
