Module Import alias Import alias Import alias FunctionDef arguments args NameParam NameParam defaults body If CompareLtELt Num NameLoad AttributeLoad NameLoad attr body Return BinOpMod Str TupleLoad NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index NameLoad If CompareEq NameLoad Num body Return Str If CompareEq NameLoad Num body Return Str Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body If CompareEq NameLoad Str body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If BoolOpOr CompareIs NameLoad NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Print NameLoad BinOpMod Str NameLoad Return For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr While Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad If NameLoad body Break Print NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq NameLoad Num body Return Assign NameStore Num Print NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Num Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad orelse Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num AttributeLoad NameLoad attr body Print NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Print NameLoad BinOpMod Str NameLoad If CompareIs NameLoad NameLoad body Return Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareGtE NameLoad Num body Pass orelse If CompareEq NameLoad AttributeLoad NameLoad attr body For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad AttributeLoad NameLoad attr body For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Continue Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad body For NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd CompareEq NameLoad AttributeLoad NameLoad attr CompareEq NameLoad Num body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Print NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list If CompareEq NameLoad Str body FunctionDef arguments args defaults body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Expr Call NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad
N/A N/A xlrd N/A sys N/A glob scope_as_string N/A N/A book scope N/A N/A N/A N/A 0 scope N/A book nsheets N/A N/A N/A sheet #%d (%r) N/A scope N/A N/A N/A book sheet_names N/A scope N/A N/A scope -1 N/A N/A Global N/A N/A scope -2 N/A N/A Macro/VBA N/A N/A Unknown scope value (%r) scope N/A do_scope_query N/A N/A book scope_strg show_contents f N/A 0 N/A sys stdout N/A N/A N/A N/A qscope N/A int scope_strg N/A N/A N/A ValueError N/A N/A N/A scope_strg * N/A N/A qscope None N/A N/A qscope N/A N/A N/A N/A book sheet_names index scope_strg N/A f N/A %r => %d N/A scope_strg qscope N/A nobj N/A book name_obj_list N/A N/A N/A N/A qscope None N/A N/A nobj scope qscope N/A N/A N/A show_name_object book nobj show_contents f N/A show_name_details N/A N/A book name show_contents f N/A 0 N/A sys stdout N/A N/A 
    book -- Book object obtained from xlrd.open_workbook().
    name -- The name that's being investigated.
    show_contents -- 0: Don't; 1: Non-empty cells only; 2: All cells
    f -- Open output file handle.
     N/A name_lcase N/A N/A name lower N/A nobj_list N/A N/A N/A book name_map get name_lcase N/A N/A nobj_list N/A N/A f N/A %r: unknown name name N/A N/A nobj nobj_list N/A N/A N/A show_name_object book nobj show_contents f N/A show_name_details_in_scope N/A N/A book name scope_strg show_contents f N/A 0 N/A sys stdout N/A N/A N/A N/A scope N/A int scope_strg N/A N/A N/A ValueError N/A N/A scope N/A N/A N/A N/A book sheet_names index scope_strg N/A f N/A %r => %d N/A scope_strg scope N/A name_lcase N/A N/A name lower N/A 1 N/A N/A nobj N/A N/A N/A book name_and_scope_map get N/A name_lcase scope N/A nobj N/A N/A N/A f N/A Name %r not found in scope %d N/A name scope N/A N/A scope -1 N/A N/A N/A scope -1 N/A f N/A Name %r found in scope %d N/A name scope N/A N/A show_name_object book nobj show_contents f N/A showable_cell_value N/A N/A celltype cellvalue datemode N/A N/A N/A N/A celltype N/A xlrd XL_CELL_DATE N/A N/A N/A N/A showval N/A N/A xlrd xldate_as_tuple cellvalue datemode N/A N/A N/A N/A xlrd XLDateError N/A N/A N/A e1 e2 N/A N/A N/A sys exc_info N/A 2 N/A showval N/A %s:%s N/A N/A e1 __name__ e2 N/A N/A N/A celltype N/A xlrd XL_CELL_ERROR N/A N/A showval N/A N/A N/A xlrd error_text_from_code get cellvalue N/A <Unknown error code 0x%02x> cellvalue N/A N/A showval cellvalue N/A showval N/A show_name_object N/A N/A book nobj show_contents f N/A 0 N/A sys stdout N/A N/A f N/A 
Name: %r, scope: %r (%s) N/A N/A nobj name N/A nobj scope N/A scope_as_string book N/A nobj scope N/A res N/A nobj result N/A f N/A Formula eval result: %r res N/A N/A res None N/A N/A N/A kind N/A res kind N/A value N/A res value N/A N/A kind 0 N/A N/A N/A N/A N/A kind N/A xlrd oREL N/A N/A i N/A xrange N/A len value N/A N/A ref3d N/A value N/A i N/A f N/A Range %d: %r ==> %s N/A i N/A ref3d coords N/A N/A xlrd rangename3drel book ref3d N/A N/A N/A kind N/A xlrd oREF N/A N/A i N/A xrange N/A len value N/A N/A ref3d N/A value N/A i N/A f N/A Range %d: %r ==> %s N/A i N/A ref3d coords N/A N/A xlrd rangename3d book ref3d N/A N/A show_contents N/A N/A N/A datemode N/A book datemode N/A shx N/A xrange N/A ref3d shtxlo N/A ref3d shtxhi N/A N/A sh N/A N/A book sheet_by_index shx N/A f N/A    Sheet #%d (%s) N/A shx N/A sh name N/A rowlim N/A min N/A ref3d rowxhi N/A sh nrows N/A collim N/A min N/A ref3d colxhi N/A sh ncols N/A rowx N/A xrange N/A ref3d rowxlo rowlim N/A N/A colx N/A xrange N/A ref3d colxlo collim N/A N/A cty N/A N/A sh cell_type rowx colx N/A N/A N/A cty N/A xlrd XL_CELL_EMPTY N/A show_contents 1 N/A N/A N/A cval N/A N/A sh cell_value rowx colx N/A sval N/A showable_cell_value cty cval datemode N/A f N/A       (%3d,%3d) %-5s: %r N/A rowx colx N/A N/A xlrd cellname rowx colx sval N/A N/A N/A __name__ __main__ N/A usage N/A N/A N/A N/A N/A text 
usage: xlrdnameAIPdemo.py glob_pattern name scope show_contents

where:
    "glob_pattern" designates a set of files
    "name" is a name or '*' (all names)
    "scope" is -1 (global) or a sheet number
        or a sheet name or * (all scopes)
    "show_contents" is one of 0 (no show),
       1 (only non-empty cells), or 2 (all cells)

Examples (script name and glob_pattern arg omitted for brevity)
    [Searching through book.name_obj_list]
    * * 0 lists all names
    * * 1 lists all names, showing referenced non-empty cells
    * 1 0 lists all names local to the 2nd sheet
    * Northern 0 lists all names local to the 'Northern' sheet
    * -1 0 lists all names with global scope
    [Initial direct access through book.name_map]
    Sales * 0 lists all occurrences of "Sales" in any scope
    [Direct access through book.name_and_scope_map]
    Revenue -1 0 checks if "Revenue" exists in global scope

 N/A N/A N/A N/A sys stdout write text N/A N/A N/A N/A len N/A sys argv 5 N/A N/A N/A usage N/A N/A N/A sys exit 0 N/A arg_pattern N/A N/A sys argv N/A 1 N/A arg_name N/A N/A sys argv N/A 2 N/A arg_scope N/A N/A sys argv N/A 3 N/A arg_show_contents N/A int N/A N/A sys argv N/A 4 N/A fname N/A N/A glob glob arg_pattern N/A N/A book N/A N/A xlrd open_workbook fname N/A N/A arg_name * N/A N/A N/A do_scope_query book arg_scope arg_show_contents N/A N/A N/A arg_scope * N/A N/A N/A show_name_details book arg_name arg_show_contents N/A N/A N/A show_name_details_in_scope book arg_name arg_scope arg_show_contents