Files
cantera/Cantera/python/tutorial/tut3.py

49 lines
1.3 KiB
Python
Raw Normal View History

2003-09-09 22:47:49 +00:00
######################################################
2004-05-22 03:52:07 +00:00
print """
Tutorial 3: Getting Help
"""
2003-09-09 22:47:49 +00:00
######################################################
2004-05-23 17:43:28 +00:00
# Suppose you have created a Cantera object and want to know what
# methods are available for it, and get help on using the methods.
from Cantera import *
g = GRI30()
2003-09-09 22:47:49 +00:00
2004-05-23 17:43:28 +00:00
# The first thing you need to know is the Python class that object g
# belongs to. In Python, the class an object belongs to is stored in
# data member __class__:
print g.__class__
# To get help on this class, type
help(g.__class__)
2003-09-09 22:47:49 +00:00
2004-03-10 14:30:55 +00:00
# You can also use the Python module browser to view this same
2004-05-24 13:21:34 +00:00
# information in a web browser. Under Windows, on the Start menu
# select
# Start
# |---Programs
# |---Python2.x
# |---Module Docs
#
# On unix, linux, or Mac OSX, at a shell prompt type
#
# pydoc -g
#
# A small pop-up window will appear. Enter 'Cantera' in the search
# box, or else simply click on 'open browser', then navigate to the
# Cantera module, and then select what you want documentation about.
# Note: if you run into problems running the module browser this way,
# do this instead: Run 'pythonw' interactively (not 'python'), import
# module 'pydoc', and call function 'gui':
#
# pythonw
# >>> import pydoc
# >>> pydoc.gui()
#