Ask Your Question

Revision history [back]

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.

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.