Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad SubscriptLoad Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str attr Index NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs Call AttributeLoad NameLoad attr Str NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Str body Return Call NameLoad Call AttributeLoad NameLoad attr orelse If Call AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr NameLoad TryExcept body Return SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body If CompareIn NameLoad ListLoad Str body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpAdd BinOpAdd NameLoad Str Call AttributeLoad NameLoad attr NameLoad Str For NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore BinOpMod Str TupleLoad NameLoad IfExp AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body If AttributeLoad NameLoad attr body If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num orelse If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Slice BinOpAdd Call NameLoad NameLoad Num attr decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str If AttributeLoad NameLoad attr body Assign NameStore Str Return BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs Call AttributeLoad NameLoad attr Str NameLoad body Return SubscriptLoad SubscriptLoad Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str attr Index NameLoad Index Num Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs Call AttributeLoad NameLoad attr Str NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs Call AttributeLoad NameLoad attr Str NameLoad body Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs Call AttributeLoad NameLoad attr Str NameLoad body Return Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Str body Return Call NameLoad Call AttributeLoad NameLoad attr orelse TryExcept body Return SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr NameLoad NameLoad Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str attr body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr Str body If BoolOpOr CompareEq NameLoad Str CompareEq Call AttributeLoad NameLoad attr Str body Continue Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num If CompareEq NameLoad Str body Continue If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Slice Num body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Str If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A __future__ absolute_import __future__ print_function __future__ unicode_literals __future__ with_statement N/A functools twisted.internet defer txtorcon.interface ITorControlProtocol MagicContainer N/A object N/A N/A 
    This merely contains 1 or more methods or further MagicContainer
    instances; see _do_setup in TorInfo.

    Once _setup_complete() is called, this behaves differently so that
    one can get nicer access to GETINFO things from TorInfo --
    specifically dir() and so forth pretend that there are only
    methods/attributes that pertain to actual Tor GETINFO keys.

    See TorInfo.
     __init__ N/A N/A self n N/A N/A N/A N/A self _txtorcon_name n N/A N/A self attrs N/A N/A N/A self _setup False N/A _setup_complete N/A N/A self N/A N/A N/A N/A self _setup True N/A _add_attribute N/A N/A self n v N/A N/A N/A N/A N/A self attrs N/A n v N/A __repr__ N/A N/A self N/A N/A N/A N/A N/A object __getattribute__ self _txtorcon_name N/A __getitem__ N/A N/A self idx N/A N/A N/A N/A N/A N/A list N/A N/A N/A N/A object __getattribute__ self attrs items N/A idx N/A 1 N/A __len__ N/A N/A self N/A N/A N/A N/A len N/A N/A object __getattribute__ self attrs N/A __dir__ N/A N/A self N/A N/A N/A N/A list N/A N/A N/A N/A object __getattribute__ self attrs keys N/A __getattribute__ N/A N/A self name N/A N/A N/A sup N/A super MagicContainer self N/A N/A N/A N/A sup __getattribute__ _setup False N/A N/A N/A N/A sup __getattribute__ name N/A attrs N/A N/A sup __getattribute__ attrs N/A N/A name __members__ N/A N/A N/A list N/A N/A attrs keys N/A N/A N/A N/A name startswith __ N/A N/A N/A N/A sup __getattribute__ name N/A N/A N/A N/A attrs N/A name N/A N/A N/A KeyError N/A N/A N/A name N/A dump N/A N/A N/A N/A object __getattribute__ self name N/A N/A AttributeError name N/A dump N/A N/A self prefix N/A N/A N/A prefix N/A N/A prefix . N/A N/A object __getattribute__ self _txtorcon_name N/A x N/A list N/A N/A N/A N/A object __getattribute__ self attrs values N/A N/A N/A N/A x dump prefix N/A N/A ConfigMethod N/A object N/A __init__ N/A N/A self info_key protocol takes_arg N/A False N/A N/A N/A self info_key info_key N/A N/A self proto protocol N/A N/A self takes_arg takes_arg N/A dump N/A N/A self prefix N/A N/A N/A n N/A N/A N/A self info_key replace / . N/A n N/A N/A n replace - _ N/A s N/A %s(%s) N/A n N/A N/A self takes_arg arg N/A s N/A __call__ N/A N/A self N/A args N/A N/A N/A self takes_arg N/A N/A N/A N/A len args 1 N/A N/A N/A TypeError N/A "%s" takes exactly one argument N/A self info_key N/A req N/A %s/%s N/A N/A self info_key N/A str N/A args N/A 0 N/A N/A N/A N/A len args 0 N/A N/A N/A TypeError N/A "%s" takes no arguments N/A self info_key N/A req N/A self info_key stripper N/A N/A key arg N/A N/A N/A N/A N/A N/A N/A N/A arg strip N/A N/A N/A len key 1 strip N/A N/A d N/A N/A N/A self proto get_info_raw req N/A N/A N/A d addCallback N/A N/A functools partial stripper req N/A d N/A __str__ N/A N/A self N/A N/A N/A arg N/A N/A self takes_arg N/A N/A arg arg N/A N/A %s(%s) N/A N/A N/A N/A self info_key replace - _ arg N/A N/A TorInfo N/A object N/A N/A Implements some attribute magic over top of TorControlProtocol so
    that all the available GETINFO values are gettable in a little
    easier fashion. Dashes are replaced by underscores (since dashes
    aren't valid in method/attribute names for Python). Some of the
    magic methods will take a single string argument if the
    corresponding Tor GETINFO would take one (in 'GETINFO info/names'
    it will end with '/*', and the same in torspec). In either case,
    the method returns a Deferred which will callback with the
    requested value, always a string.

    For example (see also examples/tor_info.py):

        proto = TorControlProtocol()
        #...
        def cb(arg):
            print arg
        info = TorInfo(proto)
        info.traffic.written().addCallback(cb)
        info.ip_to_country('8.8.8.8').addCallback(cb)

    For interactive use -- or even checking things progammatically --
    TorInfo pretends it only has attributes that coorespond to valid
    GETINFO calls.  So for example, dir(info) will only return all the
    currently valid top-level things. In the above example this might
    be ['traffic', 'ip_to_country'] (of course in practice this is a
    much longer list). And "dir(info.traffic)" might return ['read',
    'written']

    For something similar to this for configuration (GETCONF, SETCONF)
    see TorConfig which is quite a lot more complicated (internally)
    since you can set config items.

    NOTE that 'GETINFO config/*' is not supported as it's the only
    case that's not a leaf, but theoretically a method.

     __init__ N/A N/A self control errback N/A None N/A N/A N/A self _setup False N/A N/A self attrs N/A N/A After _setup is True, these are all we show as attributes. N/A N/A self protocol N/A ITorControlProtocol control N/A N/A self errback errback N/A N/A self post_bootstrap N/A N/A defer Deferred N/A N/A N/A self protocol post_bootstrap N/A N/A N/A N/A N/A N/A self protocol post_bootstrap addCallback N/A self bootstrap N/A N/A N/A N/A self bootstrap N/A _add_attribute N/A N/A self n v N/A N/A N/A N/A N/A self attrs N/A n v N/A __getitem__ N/A N/A self idx N/A N/A N/A sup N/A super TorInfo self N/A N/A N/A N/A sup __getattribute__ _setup True N/A N/A N/A N/A N/A list N/A N/A N/A N/A object __getattribute__ self attrs items N/A idx N/A 1 N/A N/A TypeError No __getitem__ until we've setup. N/A __len__ N/A N/A self N/A N/A N/A sup N/A super TorInfo self N/A N/A N/A N/A sup __getattribute__ _setup True N/A N/A N/A len N/A N/A object __getattribute__ self attrs N/A N/A TypeError No length until we're setup. N/A __dir__ N/A N/A self N/A N/A N/A sup N/A super TorInfo self N/A N/A N/A N/A sup __getattribute__ _setup True N/A N/A N/A list N/A N/A N/A N/A sup __getattribute__ attrs keys N/A N/A list N/A N/A N/A N/A sup __getattribute__ __dict__ keys N/A __getattribute__ N/A N/A self name N/A N/A N/A sup N/A super TorInfo self N/A N/A N/A N/A sup __getattribute__ _setup False N/A N/A N/A N/A sup __getattribute__ name N/A attrs N/A N/A sup __getattribute__ attrs N/A N/A name __members__ N/A N/A N/A list N/A N/A attrs keys N/A N/A N/A N/A N/A attrs N/A name N/A N/A N/A KeyError N/A N/A N/A name dump N/A N/A N/A N/A object __getattribute__ self name N/A N/A AttributeError name N/A bootstrap N/A N/A self N/A args N/A N/A d N/A N/A N/A self protocol get_info_raw info/names N/A N/A N/A d addCallback N/A self _do_setup N/A N/A self errback N/A N/A N/A N/A d addErrback N/A self errback N/A N/A N/A d addCallback N/A self _setup_complete N/A d N/A dump N/A N/A self N/A N/A N/A x N/A N/A N/A N/A object __getattribute__ self attrs values N/A N/A N/A N/A x dump N/A _do_setup N/A N/A self data N/A N/A N/A added_magic N/A N/A line N/A N/A data split N/A N/A N/A N/A line info/names= N/A N/A N/A line strip N/A N/A N/A N/A name documentation N/A N/A line split 1 N/A N/A name config/* N/A N/A N/A N/A N/A name endswith /* N/A N/A bits N/A N/A N/A name N/A -2 split / N/A takes_arg True N/A N/A bits N/A N/A name split / N/A takes_arg False N/A mine self N/A bit N/A bits N/A -1 N/A N/A bit N/A N/A bit replace - _ N/A N/A bit N/A mine attrs N/A N/A mine N/A N/A mine attrs N/A bit N/A N/A N/A isinstance mine MagicContainer N/A N/A N/A RuntimeError N/A Already had something: %s for %s N/A bit name N/A N/A c N/A MagicContainer bit N/A N/A N/A added_magic append c N/A N/A N/A mine _add_attribute bit c N/A mine c N/A n N/A N/A N/A bits N/A -1 replace - _ N/A N/A n N/A mine attrs N/A N/A N/A RuntimeError N/A Already had something: %s for %s N/A n name N/A N/A N/A mine _add_attribute n N/A ConfigMethod N/A N/A / join bits N/A self protocol takes_arg N/A c added_magic N/A N/A N/A N/A c _setup_complete N/A None N/A _setup_complete N/A N/A self N/A args N/A N/A pb N/A self post_bootstrap N/A N/A self _setup True N/A N/A N/A pb callback self N/A N/A