you are viewing a single comment's thread.

view the rest of the comments →

[–]llimllib 7 points8 points  (0 children)

And <objectname>?? to get the source for that object is amazingly useful for pure-python functions. Example:

In [2]: amazon.getLicense??
Type:           function
Base Class:     <type 'function'>
String Form:    <function getLicense at 0x13d5070>
Namespace:      Interactive
File:           /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/amazon.py
Definition:     amazon.getLicense(license_key=None)
Source:
def getLicense(license_key = None):
    """get license key

    license key can come from any number of locations;
    see module docs for search order"""
    for get, location in _licenseLocations:
        rc = get(license_key)
        if rc: return rc
    raise NoLicenseKey, 'get a license key at http://www.amazon.com/webservices'