On Mar 20, 2009, at 9:21 PM, Marshall Hampton wrote: > > There might be a better way of doing this, but one way to get the > docstrings that show up with ? is: > > q = globals().keys() > q.sort() > docstrings = [eval(x).__doc__ for x in q] > > It really depends on what exactly you want to do though - it may be > more helpful to use a dictionary where the keys are the keys in > globals > () and the values are the docstrings.
This would be sage: all_docs = [(name, f.__doc__) for name, f in globals().items()] > On Mar 20, 8:17 pm, meitnik <meit...@gmail.com> wrote: >> Cool, very helpful. Thank you! >> Ok I get 1555. I can list them if you want. Whats missing then?? ---------------------------------------------------------------------- | Sage Version 3.4, Release Date: 2009-03-11 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: len(globals().keys()) 1611 I guess I had been using that session for a while. >> Next, how do I get the '?' info for each function in a loop in a >> worksheet? >> I guess I need a py script to scrap out the docstrings from each >> modules (so I can sort/arrange the functions correctly)? This really is just the tip of the iceberg in terms of what is available--most functionality is methods on objects (otherwise the namespace would be cluttered with tens of thousands of functions. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---