Phoenix Logo

phoenix_title wx.py.introspect

Provides a variety of introspective-type support functions for things like call tips and command auto completion.

function_summary Functions Summary

getAllAttributeNames Return dict of all attributes, including inherited, for an object.
getAttributeNames Return list of unique attributes, including inherited, for obj.
getAutoCompleteList Return list of auto-completion options for command.
getBaseObject Return base object and dropSelf indicator for an object.
getCallTip For a command, return a tuple of object name, argspec, tip text.
getConstructor Return constructor for class object, or None if there isn’t one.
getRoot Return the rightmost root portion of an arbitrary Python command.
getTokens Return list of token tuples for command.
hasattrAlwaysReturnsTrue  
rtrimTerminus Return command minus anything that follows the final terminator.

Functions



getAllAttributeNames(obj)

Return dict of all attributes, including inherited, for an object.

Recursively walk through a class and all base classes.



getAttributeNames(obj, includeMagic=1, includeSingle=1, includeDouble=1)

Return list of unique attributes, including inherited, for obj.



getAutoCompleteList(command='', locals=None, includeMagic=1, includeSingle=1, includeDouble=1)

Return list of auto-completion options for command.

The list of options will be based on the locals namespace.



getBaseObject(obj)

Return base object and dropSelf indicator for an object.



getCallTip(command='', locals=None)

For a command, return a tuple of object name, argspec, tip text.

The call tip information will be based on the locals namespace.



getConstructor(obj)

Return constructor for class object, or None if there isn’t one.



getRoot(command, terminator=None)

Return the rightmost root portion of an arbitrary Python command.

Return only the root portion that can be eval()’d without side effects. The command would normally terminate with a ‘(‘ or ‘.’. The terminator and anything after the terminator will be dropped.



getTokens(command)

Return list of token tuples for command.



hasattrAlwaysReturnsTrue(obj)


rtrimTerminus(command, terminator=None)

Return command minus anything that follows the final terminator.