First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The answer may depend on what you mean by "available". I think this gives a list of all classes in Sage's default namespace:

import inspect
[_ for _ in dir() if inspect.isclass(eval(_))]

I suppose you could replace dir() with dir(MODULE) and then iterate over all py and pyx files in Sage's library (as in dir(sage.algebras.steenrod.steenrod_algebra_misc)). To do this iteration, you might use os.path.walk. Once you've found a class, dir(CLASS) should give you its attributes and methods.

click to hide/show revision 2
No.2 Revision

The answer may depend on what you mean by "available". I think this gives a list of all classes in Sage's default namespace:

import inspect
[_ for _ in dir() if inspect.isclass(eval(_))]

To get a more complete list, I suppose you could replace dir() with dir(MODULE) and then iterate over all py and pyx files in Sage's library (as in dir(sage.algebras.steenrod.steenrod_algebra_misc)). To do this iteration, you might use os.path.walk. Once you've found a class, dir(CLASS) should give you its attributes and methods.