Module Expr Str TryExcept body Import alias alias alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpAdd Call NameLoad NameLoad Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Num body Return NameLoad orelse Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad keyword Num keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Num keyword NameLoad keyword NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore Num While Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIn Call NameLoad SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad orelse If CompareIs Call NameLoad SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr body Assign NameStore Call SubscriptLoad NameLoad Index NameLoad Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse If NameLoad body Break orelse Raise Call NameLoad Str Assign NameStore BinOpAdd NameLoad Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Break ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Break Assign NameStore Call AttributeLoad Str attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad AttributeLoad NameLoad attr orelse Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad Num Num NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr CompareGtE Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Num If BoolOpOr CompareGtE Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Num CompareGtE Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Num body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str SubscriptLoad Call NameLoad AttributeLoad NameLoad attr Slice Num Expr Call AttributeLoad NameLoad attr BinOpAdd Str SubscriptLoad Call NameLoad AttributeLoad NameLoad attr Slice Num Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad body Expr Str If CompareEq Call NameLoad NameLoad Call NameLoad Num body Raise Call NameLoad Str If CompareNotEq Call NameLoad NameLoad Call NameLoad ListLoad body Raise Call NameLoad Str If CompareEq NameLoad ListLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpAdd BinOpAdd Str Call AttributeLoad Str attr AttributeLoad NameLoad attr Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Str Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Str If AttributeLoad NameLoad attr body TryExcept body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpAdd Str Call NameLoad NameLoad orelse Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num Num handlers ExceptHandler body Pass Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num For NameStore Call NameLoad Num NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpOr CompareLt NameLoad Num CompareLt NameLoad Num body Raise NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr If CompareLt NameLoad Num body Raise NameLoad Str orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Num If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGtE NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGtE NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Raise NameLoad Str handlers ExceptHandler body Pass Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareLt NameLoad Num body Raise NameLoad BinOpAdd Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareLt NameLoad Num body Raise NameLoad Str orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad While NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad If BoolOpAnd CompareLt NameLoad Num CompareIsNot NameLoad NameLoad body Return NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BinOpBitAnd SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Assign SubscriptStore NameLoad Index Num BinOpBitOr SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr orelse Assign SubscriptStore NameLoad Index Num BinOpBitAnd SubscriptLoad NameLoad Index Num UnaryOpInvert AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str If AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr ListLoad ListLoad Num If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad Str orelse If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr ListLoad ListLoad Num If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr ListLoad ListLoad NameLoad If UnaryOpNot NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad Str orelse Raise Call NameLoad Str If CompareIn AttributeLoad NameLoad attr NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad Str If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareEq NameLoad Num body Return Str If CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad AttributeLoad NameLoad attr If CompareEq NameLoad Num body Return AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareEq NameLoad Num body Return Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str AttributeLoad NameLoad attr If CompareEq NameLoad Num body Return BinOpAdd AttributeLoad NameLoad attr Str orelse Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Raise NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore ListLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Break Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareGtE NameLoad Num CompareLtE NameLoad Num body Assign NameStore BinOpAdd BinOpSub NameLoad Call NameLoad Str Num Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num Num Num Num Num If CompareNotIn NameLoad NameLoad body Return Num Return Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Index AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Index AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad orelse Return NameLoad Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num orelse Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return NameLoad If AttributeLoad NameLoad attr body Assign NameStore Num orelse Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Raise Call NameLoad Str orelse Raise NameLoad If CompareEq NameLoad Num body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Raise Call NameLoad Str orelse Raise NameLoad If CompareEq NameLoad Num body Return NameLoad If CompareEq NameLoad Num body Return NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return ListLoad If CompareIsNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore BinOpBitOr NameLoad AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body If CompareIn Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareIs Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str Call NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Expr Str If BoolOpOr CompareIn Call NameLoad NameLoad AttributeLoad NameLoad attr CompareIn NameLoad TupleLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign AttributeStore NameLoad attr NameLoad If CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Assign NameStore AttributeLoad NameLoad attr TryExcept body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If CompareGtE NameLoad Num body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr If BoolOpAnd CompareLt NameLoad Num CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareGtE NameLoad Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad BinOpAdd BinOpAdd Call NameLoad NameLoad Str Call NameLoad NameLoad ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareGtE NameLoad Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Raise Call NameLoad BinOpAdd BinOpAdd Call NameLoad NameLoad Str Call NameLoad NameLoad ExceptHandler body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Raise decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str Num Assign NameStore Call AttributeLoad NameLoad attr Str Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return SubscriptLoad Call AttributeLoad NameLoad attr Str NameLoad Slice Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str Num If CompareEq NameLoad Num body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Call NameLoad Num NameLoad NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str While BoolOpAnd CompareNotEq NameLoad Str Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str While Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad ListLoad If CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Break Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad While NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr If CompareLt NameLoad Num body Return TupleLoad ListLoad ListLoad ListLoad orelse Raise decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad For TupleStore NameStore NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Continue If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp TupleLoad SubscriptLoad NameLoad Index Num BinOpMod Str NameLoad comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Num Str If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Assign NameStore UnaryOpUSub BinOpAdd NameLoad Call NameLoad NameLoad orelse Assign NameStore UnaryOpUSub NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd CompareGtE NameLoad Num CompareLt NameLoad NameLoad body Assign NameStore NameLoad Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad If CompareEq NameLoad NameLoad body Return Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad For TupleStore NameStore NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Continue If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp TupleLoad NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Num Str If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Num orelse Assign NameStore Call NameLoad Num BinOpSub Call NameLoad NameLoad NameLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Continue Assign NameStore Call AttributeLoad NameLoad attr If CompareLt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Return Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body If Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Return NameLoad If BoolOpOr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Str body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad For NameStore NameLoad body If BoolOpOr CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr body If CompareEq NameLoad NameLoad body Expr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore NameLoad orelse Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore NameLoad orelse Assign NameStore BinOpAdd NameLoad NameLoad orelse If CompareEq NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore NameLoad orelse Assign NameStore BinOpAdd NameLoad NameLoad If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.

There are two main interfaces to Pexpect -- the function, run() and the class,
spawn. You can call the run() function to execute a command and return the
output. This is a handy replacement for os.system().

For example::

    pexpect.run('ls -la')

The more powerful interface is the spawn class. You can use this to spawn an
external child command and then interact with the child by sending lines and
expecting responses.

For example::

    child = pexpect.spawn('scp foo myname@host.example.com:.')
    child.expect ('Password:')
    child.sendline (mypassword)

This works even for commands that ask for passwords or other input outside of
the normal stdio streams.

Credits: Noah Spurrier, Richard Holden, Marco Molteni, Kimberley Burchett,
Robert Stone, Hartmut Goebel, Chad Schroeder, Erick Tryzelaar, Dave Kirby, Ids
vander Molen, George Todd, Noel Taylor, Nicolas D. Cesar, Alexander Gattin,
Geoffrey Marshall, Francisco Lourenco, Glen Mabey, Karthik Gurusamy, Fernando
Perez, Corey Minyard, Jon Cohen, Guillaume Chazarain, Andrew Ryan, Nick
Craig-Wood, Andrew Stone, Jorgen Grahn (Let me know if I forgot anyone.)

Free, open source, and all that good stuff.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Pexpect Copyright (c) 2008 Noah Spurrier
http://pexpect.sourceforge.net/

$Id: pexpect.py 507 2007-12-27 02:40:52Z noah $
 N/A N/A N/A os sys time N/A select N/A string N/A re N/A struct N/A resource N/A types N/A pty N/A tty N/A termios N/A fcntl N/A errno N/A traceback N/A signal N/A N/A N/A ImportError N/A e N/A N/A N/A ImportError N/A N/A str e 

A critical module was not found. Probably this operating system does not
support it. Pexpect is intended for UNIX-like operating systems. N/A __version__ 2.3 N/A __revision__ $Revision: 399 $ N/A __all__ N/A ExceptionPexpect EOF TIMEOUT spawn run which split_command_line __version__ __revision__ ExceptionPexpect N/A Exception N/A N/A Base class for all exceptions raised by this module.
     __init__ N/A N/A self value N/A N/A N/A N/A self value value N/A __str__ N/A N/A self N/A N/A N/A N/A str N/A self value N/A get_trace N/A N/A self N/A N/A N/A This returns an abbreviated stack trace with lines that only concern
        the caller. In other words, the stack trace inside the Pexpect module
        is not included.  N/A tblist N/A N/A traceback extract_tb N/A N/A N/A sys exc_info N/A 2 N/A tblist N/A item N/A item tblist N/A N/A self __filter_not_pexpect item N/A tblist N/A N/A traceback format_list tblist N/A N/A N/A join tblist N/A __filter_not_pexpect N/A N/A self trace_list_item N/A N/A N/A This returns True if list item 0 the string 'pexpect.py' in it.  N/A N/A N/A N/A N/A trace_list_item N/A 0 find pexpect.py -1 N/A N/A True N/A N/A False N/A N/A EOF N/A ExceptionPexpect N/A N/A Raised when EOF is read from a child. This usually means the child has exited. N/A TIMEOUT N/A ExceptionPexpect N/A N/A Raised when a read time exceeds the timeout.  N/A run N/A N/A command timeout withexitstatus events extra_args logfile cwd env N/A -1 False None None None None None N/A N/A 
    This function runs the given command; waits for it to finish; then
    returns all output as a string. STDERR is included in output. If the full
    path to the command is not given then the path is searched.

    Note that lines are terminated by CR/LF (\r\n) combination even on
    UNIX-like systems because this is the standard for pseudo ttys. If you set
    'withexitstatus' to true, then run will return a tuple of (command_output,
    exitstatus). If 'withexitstatus' is false then this returns just
    command_output.

    The run() function can often be used instead of creating a spawn instance.
    For example, the following code uses spawn::

        from pexpect import *
        child = spawn('scp foo myname@host.example.com:.')
        child.expect ('(?i)password')
        child.sendline (mypassword)

    The previous code can be replace with the following::

        from pexpect import *
        run ('scp foo myname@host.example.com:.', events={'(?i)password': mypassword})

    Examples
    ========

    Start the apache daemon on the local machine::

        from pexpect import *
        run ("/usr/local/apache/bin/apachectl start")

    Check in a file using SVN::

        from pexpect import *
        run ("svn ci -m 'automatic commit' my_file.py")

    Run a command and capture exit status::

        from pexpect import *
        (command_output, exitstatus) = run ('ls -l /bin', withexitstatus=1)

    Tricky Examples
    ===============

    The following will run SSH and execute 'ls -l' on the remote machine. The
    password 'secret' will be sent if the '(?i)password' pattern is ever seen::

        run ("ssh username@machine.example.com 'ls -l'", events={'(?i)password':'secret\n'})

    This will start mencoder to rip a video from DVD. This will also display
    progress ticks every 5 seconds as it runs. For example::

        from pexpect import *
        def print_ticks(d):
            print d['event_count'],
        run ("mencoder dvd://1 -o video.avi -oac copy -ovc copy", events={TIMEOUT:print_ticks}, timeout=5)

    The 'events' argument should be a dictionary of patterns and responses.
    Whenever one of the patterns is seen in the command out run() will send the
    associated response string. Note that you should put newlines in your
    string if Enter is necessary. The responses may also contain callback
    functions. Any callback is function that takes a dictionary as an argument.
    The dictionary contains all the locals from the run() function, so you can
    access the child spawn object or any other variable defined in run()
    (event_count, child, and extra_args are the most useful). A callback may
    return True to stop the current run process otherwise run() continues until
    the next event. A callback may also return a string which will be sent to
    the child. 'extra_args' is not used by directly run(). It provides a way to
    pass data to a callback function through run() through the locals
    dictionary passed to a callback.  N/A N/A timeout -1 N/A N/A child N/A spawn command maxread 2000 logfile logfile cwd cwd env env N/A N/A child N/A spawn command timeout timeout maxread 2000 logfile logfile cwd cwd env env N/A N/A events None N/A N/A patterns N/A N/A events keys N/A responses N/A N/A events values N/A N/A patterns None N/A responses None N/A child_result_list N/A N/A event_count 0 N/A 1 N/A N/A N/A N/A index N/A N/A child expect patterns N/A N/A N/A type N/A child after N/A types StringTypes N/A N/A N/A N/A child_result_list append N/A N/A child before N/A child after N/A N/A N/A N/A child_result_list append N/A child before N/A N/A N/A type N/A responses N/A index N/A types StringTypes N/A N/A N/A N/A child send N/A responses N/A index N/A N/A N/A N/A type N/A responses N/A index N/A types FunctionType N/A N/A callback_result N/A N/A responses N/A index N/A locals N/A N/A N/A N/A sys stdout flush N/A N/A N/A type callback_result N/A types StringTypes N/A N/A N/A N/A child send callback_result N/A N/A callback_result N/A N/A N/A N/A N/A TypeError The callback must be a string or function type. N/A event_count N/A event_count 1 N/A N/A N/A TIMEOUT N/A e N/A N/A N/A N/A child_result_list append N/A child before N/A N/A N/A EOF N/A e N/A N/A N/A N/A child_result_list append N/A child before N/A N/A child_result N/A N/A join child_result_list N/A withexitstatus N/A N/A N/A N/A child close N/A N/A child_result N/A child exitstatus N/A N/A child_result N/A spawn N/A object N/A N/A This is the main class interface for Pexpect. Use this class to start
    and control child applications.  __init__ N/A N/A self command args timeout maxread searchwindowsize logfile cwd env N/A N/A 30 2000 None None None None N/A N/A This is the constructor. The command parameter may be a string that
        includes a command and any arguments to the command. For example::

            child = pexpect.spawn ('/usr/bin/ftp')
            child = pexpect.spawn ('/usr/bin/ssh user@example.com')
            child = pexpect.spawn ('ls -latr /tmp')

        You may also construct it with a list of arguments like so::

            child = pexpect.spawn ('/usr/bin/ftp', [])
            child = pexpect.spawn ('/usr/bin/ssh', ['user@example.com'])
            child = pexpect.spawn ('ls', ['-latr', '/tmp'])

        After this the child application will be created and will be ready to
        talk to. For normal use, see expect() and send() and sendline().

        Remember that Pexpect does NOT interpret shell meta characters such as
        redirect, pipe, or wild cards (>, |, or *). This is a common mistake.
        If you want to run a command and pipe it through another command then
        you must also start a shell. For example::

            child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > log_list.txt"')
            child.expect(pexpect.EOF)

        The second form of spawn (where you pass a list of arguments) is useful
        in situations where you wish to spawn a command and pass it its own
        argument list. This can make syntax more clear. For example, the
        following is equivalent to the previous example::

            shell_cmd = 'ls -l | grep LOG > log_list.txt'
            child = pexpect.spawn('/bin/bash', ['-c', shell_cmd])
            child.expect(pexpect.EOF)

        The maxread attribute sets the read buffer size. This is maximum number
        of bytes that Pexpect will try to read from a TTY at one time. Setting
        the maxread size to 1 will turn off buffering. Setting the maxread
        value higher may help performance in cases where large amounts of
        output are read back from the child. This feature is useful in
        conjunction with searchwindowsize.

        The searchwindowsize attribute sets the how far back in the incomming
        seach buffer Pexpect will search for pattern matches. Every time
        Pexpect reads some data from the child it will append the data to the
        incomming buffer. The default is to search from the beginning of the
        imcomming buffer each time new data is read from the child. But this is
        very inefficient if you are running a command that generates a large
        amount of data where you want to match The searchwindowsize does not
        effect the size of the incomming data buffer. You will still have
        access to the full buffer after expect() returns.

        The logfile member turns on or off logging. All input and output will
        be copied to the given file object. Set logfile to None to stop
        logging. This is the default. Set logfile to sys.stdout to echo
        everything to standard output. The logfile is flushed after each write.

        Example log input and output to a file::

            child = pexpect.spawn('some_command')
            fout = file('mylog.txt','w')
            child.logfile = fout

        Example log to stdout::

            child = pexpect.spawn('some_command')
            child.logfile = sys.stdout

        The logfile_read and logfile_send members can be used to separately log
        the input from the child and output sent to the child. Sometimes you
        don't want to see everything you write to the child. You only want to
        log what the child sends back. For example::
        
            child = pexpect.spawn('some_command')
            child.logfile_read = sys.stdout

        To separately log output sent to the child use logfile_send::
        
            self.logfile_send = fout

        The delaybeforesend helps overcome a weird behavior that many users
        were experiencing. The typical problem was that a user would expect() a
        "Password:" prompt and then immediately call sendline() to send the
        password. The user would then see that their password was echoed back
        to them. Passwords don't normally echo. The problem is caused by the
        fact that most applications print out the "Password" prompt and then
        turn off stdin echo, but if you send your password before the
        application turned off echo, then you get your password echoed.
        Normally this wouldn't be a problem when interacting with a human at a
        real keyboard. If you introduce a slight delay just before writing then
        this seems to clear up the problem. This was such a common problem for
        many users that I decided that the default pexpect behavior should be
        to sleep just before writing to the child application. 1/20th of a
        second (50 ms) seems to be enough to clear up the problem. You can set
        delaybeforesend to 0 to return to the old behavior. Most Linux machines
        don't like this to be below 0.03. I don't know why.

        Note that spawn is clever about finding commands on your path.
        It uses the same logic that "which" uses to find executables.

        If you wish to get the exit status of the child you must call the
        close() method. The exit or signal status of the child will be stored
        in self.exitstatus or self.signalstatus. If the child exited normally
        then exitstatus will store the exit return code and signalstatus will
        be None. If the child was terminated abnormally with a signal then
        signalstatus will store the signal value and exitstatus will be None.
        If you need more detail you can also read the self.status member which
        stores the status returned by os.waitpid. You can interpret this using
        os.WIFEXITED/os.WEXITSTATUS or os.WIFSIGNALED/os.TERMSIG.  N/A N/A self STDIN_FILENO N/A pty STDIN_FILENO N/A N/A self STDOUT_FILENO N/A pty STDOUT_FILENO N/A N/A self STDERR_FILENO N/A pty STDERR_FILENO N/A N/A self stdin N/A sys stdin N/A N/A self stdout N/A sys stdout N/A N/A self stderr N/A sys stderr N/A N/A self searcher None N/A N/A self ignorecase False N/A N/A self before None N/A N/A self after None N/A N/A self match None N/A N/A self match_index None N/A N/A self terminated True N/A N/A self exitstatus None N/A N/A self signalstatus None N/A N/A self status None N/A N/A self flag_eof False N/A N/A self pid None N/A N/A self child_fd -1 N/A N/A self timeout timeout N/A N/A self delimiter EOF N/A N/A self logfile logfile N/A N/A self logfile_read None N/A N/A self logfile_send None N/A N/A self maxread maxread N/A N/A self buffer N/A N/A self searchwindowsize searchwindowsize N/A N/A self delaybeforesend 0.05 N/A N/A self delayafterclose 0.1 N/A N/A self delayafterterminate 0.1 N/A N/A self softspace False N/A N/A self name N/A N/A < N/A repr self > N/A N/A self encoding None N/A N/A self closed True N/A N/A self cwd cwd N/A N/A self env env N/A N/A self __irix_hack N/A N/A N/A N/A N/A N/A sys platform lower find irix 0 N/A N/A N/A N/A N/A N/A N/A N/A sys platform lower find solaris 0 N/A N/A N/A N/A N/A N/A sys platform lower find sunos5 0 N/A N/A N/A self use_native_pty_fork False N/A N/A N/A self use_native_pty_fork True N/A N/A command None N/A N/A N/A self command None N/A N/A self args None N/A N/A self name <pexpect factory incomplete> N/A N/A N/A N/A self _spawn command args N/A __del__ N/A N/A self N/A N/A N/A This makes sure that no system resources are left open. Python only
        garbage collects Python objects. OS file descriptors are not Python
        objects, so they must be handled explicitly. If the child file
        descriptor was opened outside of this class (passed to the constructor)
        then this does not close it.  N/A N/A N/A self closed N/A N/A N/A N/A N/A N/A self close N/A N/A N/A AttributeError N/A N/A N/A __str__ N/A N/A self N/A N/A N/A This returns a human-readable string that represents the state of
        the object.  N/A s N/A N/A N/A N/A s append N/A repr self N/A N/A N/A s append N/A N/A N/A N/A version:  __version__  ( __revision__ ) N/A N/A N/A s append N/A command:  N/A str N/A self command N/A N/A N/A s append N/A args:  N/A str N/A self args N/A N/A N/A s append N/A searcher:  N/A str N/A self searcher N/A N/A N/A s append N/A buffer (last 100 chars):  N/A N/A str N/A self buffer N/A -100 N/A N/A N/A s append N/A before (last 100 chars):  N/A N/A str N/A self before N/A -100 N/A N/A N/A s append N/A after:  N/A str N/A self after N/A N/A N/A s append N/A match:  N/A str N/A self match N/A N/A N/A s append N/A match_index:  N/A str N/A self match_index N/A N/A N/A s append N/A exitstatus:  N/A str N/A self exitstatus N/A N/A N/A s append N/A flag_eof:  N/A str N/A self flag_eof N/A N/A N/A s append N/A pid:  N/A str N/A self pid N/A N/A N/A s append N/A child_fd:  N/A str N/A self child_fd N/A N/A N/A s append N/A closed:  N/A str N/A self closed N/A N/A N/A s append N/A timeout:  N/A str N/A self timeout N/A N/A N/A s append N/A delimiter:  N/A str N/A self delimiter N/A N/A N/A s append N/A logfile:  N/A str N/A self logfile N/A N/A N/A s append N/A logfile_read:  N/A str N/A self logfile_read N/A N/A N/A s append N/A logfile_send:  N/A str N/A self logfile_send N/A N/A N/A s append N/A maxread:  N/A str N/A self maxread N/A N/A N/A s append N/A ignorecase:  N/A str N/A self ignorecase N/A N/A N/A s append N/A searchwindowsize:  N/A str N/A self searchwindowsize N/A N/A N/A s append N/A delaybeforesend:  N/A str N/A self delaybeforesend N/A N/A N/A s append N/A delayafterclose:  N/A str N/A self delayafterclose N/A N/A N/A s append N/A delayafterterminate:  N/A str N/A self delayafterterminate N/A N/A N/A join s N/A _spawn N/A N/A self command args N/A N/A N/A N/A This starts the given command in a child process. This does all the
        fork/exec type of stuff for a pty. This is called by __init__. If args
        is empty then command will be parsed (split on spaces) and args will be
        set to parsed arguments.  N/A N/A N/A type command N/A type 0 N/A N/A N/A ExceptionPexpect Command is an int type. If this is a file descriptor then maybe you want to use fdpexpect.fdspawn which takes an existing file descriptor instead of a command string. N/A N/A N/A type args N/A type N/A N/A N/A N/A TypeError The argument, args, must be a list. N/A N/A args N/A N/A N/A N/A self args N/A split_command_line command N/A N/A self command N/A N/A self args N/A 0 N/A N/A N/A self args N/A args N/A N/A N/A N/A N/A self args insert 0 command N/A N/A self command command N/A command_with_path N/A which N/A self command N/A N/A command_with_path None N/A N/A N/A ExceptionPexpect N/A The command was not found or was not executable: %s. N/A self command N/A N/A self command command_with_path N/A N/A N/A self args N/A 0 N/A self command N/A N/A self name N/A N/A < N/A N/A join N/A self args > N/A N/A N/A self pid None The pid member should be None. N/A N/A N/A self command None The command member should not be None. N/A N/A self use_native_pty_fork N/A N/A N/A N/A N/A N/A self pid N/A self child_fd N/A N/A pty fork N/A N/A N/A OSError N/A e N/A N/A N/A ExceptionPexpect N/A Error! pty.fork() failed:  N/A str e N/A N/A N/A N/A self pid N/A self child_fd N/A N/A self __fork_pty N/A N/A N/A self pid 0 N/A N/A N/A N/A N/A self child_fd N/A N/A N/A sys stdout fileno N/A N/A N/A self setwinsize 24 80 N/A N/A N/A N/A N/A max_fd N/A N/A N/A resource getrlimit N/A resource RLIMIT_NOFILE N/A 0 N/A i N/A range 3 max_fd N/A N/A N/A N/A N/A N/A os close i N/A N/A N/A OSError N/A N/A N/A N/A N/A signal signal N/A signal SIGHUP N/A signal SIG_IGN N/A N/A N/A self cwd None N/A N/A N/A N/A os chdir N/A self cwd N/A N/A N/A self env None N/A N/A N/A N/A os execv N/A self command N/A self args N/A N/A N/A N/A os execvpe N/A self command N/A self args N/A self env N/A N/A self terminated False N/A N/A self closed False N/A __fork_pty N/A N/A self N/A N/A N/A This implements a substitute for the forkpty system call. This
        should be more portable than the pty.fork() function. Specifically,
        this should work on Solaris.

        Modified 10.06.05 by Geoff Marshall: Implemented __fork_pty() method to
        resolve the issue with Python's pty.fork() not supporting Solaris,
        particularly ssh. Based on patch to posixmodule.c authored by Noah
        Spurrier::

            http://mail.python.org/pipermail/python-dev/2003-May/035281.html

         N/A N/A parent_fd child_fd N/A N/A os openpty N/A N/A N/A parent_fd 0 N/A child_fd 0 N/A N/A ExceptionPexpect Error! Could not open pty with os.openpty(). N/A pid N/A N/A os fork N/A N/A pid 0 N/A N/A ExceptionPexpect Error! Failed os.fork(). N/A N/A N/A pid 0 N/A N/A N/A N/A os close parent_fd N/A N/A N/A self __pty_make_controlling_tty child_fd N/A N/A N/A os dup2 child_fd 0 N/A N/A N/A os dup2 child_fd 1 N/A N/A N/A os dup2 child_fd 2 N/A N/A child_fd 2 N/A N/A N/A N/A os close child_fd N/A N/A N/A N/A os close child_fd N/A N/A pid parent_fd N/A __pty_make_controlling_tty N/A N/A self tty_fd N/A N/A N/A This makes the pseudo-terminal the controlling tty. This should be
        more portable than the pty.fork() function. Specifically, this should
        work on Solaris.  N/A child_name N/A N/A os ttyname tty_fd N/A fd N/A N/A os open /dev/tty N/A N/A os O_RDWR N/A os O_NOCTTY N/A N/A fd 0 N/A N/A N/A N/A os close fd N/A N/A N/A os setsid N/A N/A N/A fd N/A N/A os open /dev/tty N/A N/A os O_RDWR N/A os O_NOCTTY N/A N/A fd 0 N/A N/A N/A N/A os close fd N/A ExceptionPexpect Error! We are not disconnected from a controlling tty. N/A N/A N/A N/A N/A fd N/A N/A os open child_name N/A os O_RDWR N/A N/A fd 0 N/A N/A ExceptionPexpect N/A Error! Could not open child pty,  child_name N/A N/A N/A N/A os close fd N/A fd N/A N/A os open /dev/tty N/A os O_WRONLY N/A N/A fd 0 N/A N/A ExceptionPexpect Error! Could not open controlling tty, /dev/tty N/A N/A N/A N/A os close fd N/A fileno N/A N/A self N/A N/A N/A This returns the file descriptor of the pty for the child.
         N/A N/A self child_fd N/A close N/A N/A self force N/A True N/A N/A This closes the connection with the child application. Note that
        calling close() more than once is valid. This emulates standard Python
        behavior with files. Set force to True if you want to make sure that
        the child is terminated (SIGKILL is sent if the child ignores SIGHUP
        and SIGINT).  N/A N/A N/A self closed N/A N/A N/A N/A self flush N/A N/A N/A os close N/A self child_fd N/A N/A N/A time sleep N/A self delayafterclose N/A N/A N/A self isalive N/A N/A N/A N/A N/A self terminate force N/A N/A N/A ExceptionPexpect close() could not terminate the child using terminate() N/A N/A self child_fd -1 N/A N/A self closed True N/A flush N/A N/A self N/A N/A N/A This does nothing. It is here to support the interface for a
        File-like object.  N/A N/A isatty N/A N/A self N/A N/A N/A This returns True if the file descriptor is open and connected to a
        tty(-like) device, else False.  N/A N/A N/A os isatty N/A self child_fd N/A waitnoecho N/A N/A self timeout N/A -1 N/A N/A This waits until the terminal ECHO flag is set False. This returns
        True if the echo mode is off. This returns False if the ECHO flag was
        not set False before the timeout. This can be used to detect when the
        child is waiting for a password. Usually a child application will turn
        off echo mode when it is waiting for the user to enter a password. For
        example, instead of expecting the "password:" prompt you can wait for
        the child to set ECHO off::

            p = pexpect.spawn ('ssh user@example.com')
            p.waitnoecho()
            p.sendline(mypassword)

        If timeout is None then this method to block forever until ECHO flag is
        False.

         N/A N/A timeout -1 N/A N/A timeout N/A self timeout N/A N/A timeout None N/A N/A end_time N/A N/A N/A time time timeout N/A True N/A N/A N/A N/A N/A self getecho N/A N/A True N/A N/A N/A timeout 0 N/A timeout None N/A N/A False N/A N/A timeout None N/A N/A timeout N/A end_time N/A N/A time time N/A N/A N/A time sleep 0.1 N/A getecho N/A N/A self N/A N/A N/A This returns the terminal echo mode. This returns True if echo is
        on or False if echo is off. Child applications that are expecting you
        to enter a password often set ECHO False. See waitnoecho().  N/A attr N/A N/A termios tcgetattr N/A self child_fd N/A N/A N/A attr N/A 3 N/A termios ECHO N/A N/A True N/A False N/A setecho N/A N/A self state N/A N/A N/A This sets the terminal echo mode on or off. Note that anything the
        child sent before the echo will be lost, so you should be sure that
        your input buffer is empty before you call setecho(). For example, the
        following will work as expected::

            p = pexpect.spawn('cat')
            p.sendline ('1234') # We will see this twice (once from tty echo and again from cat).
            p.expect (['1234'])
            p.expect (['1234'])
            p.setecho(False) # Turn off tty echo
            p.sendline ('abcd') # We will set this only once (echoed by cat).
            p.sendline ('wxyz') # We will set this only once (echoed by cat)
            p.expect (['abcd'])
            p.expect (['wxyz'])

        The following WILL NOT WORK because the lines sent before the setecho
        will be lost::

            p = pexpect.spawn('cat')
            p.sendline ('1234') # We will see this twice (once from tty echo and again from cat).
            p.setecho(False) # Turn off tty echo
            p.sendline ('abcd') # We will set this only once (echoed by cat).
            p.sendline ('wxyz') # We will set this only once (echoed by cat)
            p.expect (['1234'])
            p.expect (['1234'])
            p.expect (['abcd'])
            p.expect (['wxyz'])
         N/A N/A self child_fd N/A attr N/A N/A termios tcgetattr N/A self child_fd N/A state N/A N/A N/A attr N/A 3 N/A N/A attr N/A 3 N/A termios ECHO N/A N/A N/A attr N/A 3 N/A N/A attr N/A 3 N/A N/A termios ECHO N/A N/A N/A termios tcsetattr N/A self child_fd N/A termios TCSANOW attr N/A read_nonblocking N/A N/A self size timeout N/A 1 -1 N/A N/A This reads at most size characters from the child application. It
        includes a timeout. If the read does not complete within the timeout
        period then a TIMEOUT exception is raised. If the end of file is read
        then an EOF exception will be raised. If a log file was set using
        setlog() then all data will also be written to the log file.

        If timeout is None then the read may block indefinitely. If timeout is -1
        then the self.timeout value is used. If timeout is 0 then the child is
        polled and if there was no data immediately ready then this will raise
        a TIMEOUT exception.

        The timeout refers only to the amount of time to read at least one
        character. This is not effected by the 'size' parameter, so if you call
        read_nonblocking(size=100, timeout=30) and only one character is
        available right away then one character will be returned immediately.
        It will not wait for 30 seconds for another 99 characters to come in.

        This is a wrapper around os.read(). It uses select.select() to
        implement the timeout.  N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file in read_nonblocking(). N/A N/A timeout -1 N/A N/A timeout N/A self timeout N/A N/A N/A N/A self isalive N/A N/A N/A r w e N/A N/A self __select N/A N/A self child_fd N/A N/A 0 N/A N/A r N/A N/A N/A self flag_eof True N/A N/A EOF End Of File (EOF) in read_nonblocking(). Braindead platform. N/A N/A N/A self __irix_hack N/A N/A N/A r w e N/A N/A self __select N/A N/A self child_fd N/A N/A 2 N/A N/A N/A r N/A N/A N/A self isalive N/A N/A N/A self flag_eof True N/A N/A EOF End Of File (EOF) in read_nonblocking(). Pokey platform. N/A N/A r w e N/A N/A self __select N/A N/A self child_fd N/A N/A timeout N/A N/A r N/A N/A N/A N/A N/A self isalive N/A N/A N/A self flag_eof True N/A N/A EOF End of File (EOF) in read_nonblocking(). Very pokey platform. N/A N/A N/A TIMEOUT Timeout exceeded in read_nonblocking(). N/A N/A N/A self child_fd r N/A N/A N/A N/A s N/A N/A os read N/A self child_fd size N/A N/A N/A OSError N/A e N/A N/A N/A self flag_eof True N/A N/A EOF End Of File (EOF) in read_nonblocking(). Exception style platform. N/A N/A s N/A N/A N/A self flag_eof True N/A N/A EOF End Of File (EOF) in read_nonblocking(). Empty string style platform. N/A N/A N/A self logfile None N/A N/A N/A N/A N/A self logfile write s N/A N/A N/A N/A self logfile flush N/A N/A N/A self logfile_read None N/A N/A N/A N/A N/A self logfile_read write s N/A N/A N/A N/A self logfile_read flush N/A s N/A N/A ExceptionPexpect Reached an unexpected state in read_nonblocking(). N/A read N/A N/A self size N/A -1 N/A N/A This reads at most "size" bytes from the file (less if the read hits
        EOF before obtaining size bytes). If the size argument is negative or
        omitted, read all data until EOF is reached. The bytes are returned as
        a string object. An empty string is returned when EOF is encountered
        immediately.  N/A N/A size 0 N/A N/A N/A N/A size 0 N/A N/A N/A N/A self expect N/A self delimiter N/A N/A self before N/A cre N/A N/A re compile N/A .{%d} size N/A re DOTALL N/A index N/A N/A self expect N/A cre N/A self delimiter N/A N/A index 0 N/A N/A N/A self after N/A N/A self before N/A readline N/A N/A self size N/A -1 N/A N/A This reads and returns one entire line. A trailing newline is kept
        in the string, but may be absent when a file ends with an incomplete
        line. Note: This readline() looks for a \r\n pair even on UNIX
        because this is what the pseudo tty device returns. So contrary to what
        you may expect you will receive the newline as \r\n. An empty string
        is returned when EOF is hit immediately. Currently, the size argument is
        mostly ignored, so this behavior is not standard for a file-like
        object. If size is 0 then an empty string is returned.  N/A N/A size 0 N/A N/A N/A index N/A N/A self expect N/A N/A self delimiter N/A N/A index 0 N/A N/A N/A N/A self before N/A N/A N/A self before N/A __iter__ N/A N/A self N/A N/A N/A This is to support iterators over a file-like object.
         N/A self N/A next N/A N/A self N/A N/A N/A This is to support iterators over a file-like object.
         N/A result N/A N/A self readline N/A N/A result N/A N/A StopIteration N/A result N/A readlines N/A N/A self sizehint N/A -1 N/A N/A This reads until EOF using readline() and returns a list containing
        the lines thus read. The optional "sizehint" argument is ignored.  N/A lines N/A N/A True N/A N/A line N/A N/A self readline N/A N/A line N/A N/A N/A N/A N/A lines append line N/A lines N/A write N/A N/A self s N/A N/A N/A This is similar to send() except that there is no return value.
         N/A N/A N/A self send s N/A writelines N/A N/A self sequence N/A N/A N/A This calls write() for each element in the sequence. The sequence
        can be any iterable object producing strings, typically a list of
        strings. This does not add line separators There is no return value.
         N/A s sequence N/A N/A N/A N/A self write s N/A send N/A N/A self s N/A N/A N/A This sends a string to the child process. This returns the number of
        bytes written. If a log file was set then the data is also written to
        the log.  N/A N/A N/A time sleep N/A self delaybeforesend N/A N/A N/A self logfile None N/A N/A N/A N/A N/A self logfile write s N/A N/A N/A N/A self logfile flush N/A N/A N/A self logfile_send None N/A N/A N/A N/A N/A self logfile_send write s N/A N/A N/A N/A self logfile_send flush N/A c N/A N/A os write N/A self child_fd s N/A c N/A sendline N/A N/A self s N/A N/A N/A This is like send(), but it adds a line feed (os.linesep). This
        returns the number of bytes written.  N/A n N/A N/A self send s N/A n N/A n N/A N/A self send N/A os linesep N/A n N/A sendcontrol N/A N/A self char N/A N/A N/A This sends a control character to the child such as Ctrl-C or
        Ctrl-D. For example, to send a Ctrl-G (ASCII 7)::

            child.sendcontrol('g')

        See also, sendintr() and sendeof().
         N/A char N/A N/A char lower N/A a N/A ord char N/A N/A N/A a 97 N/A a 122 N/A N/A a N/A N/A a N/A ord a 1 N/A N/A N/A self send N/A chr a N/A d N/A @ ` [ { \ | ] } ^ ~ _ ? 0 0 27 27 28 28 29 29 30 30 31 127 N/A N/A char d N/A N/A 0 N/A N/A N/A self send N/A chr N/A d N/A char N/A sendeof N/A N/A self N/A N/A N/A This sends an EOF to the child. This sends a character which causes
        the pending parent output buffer to be sent to the waiting child
        program without waiting for end-of-line. If it is the first character
        of the line, the read() in the user program returns 0, which signifies
        end-of-file. This means to work as expected a sendeof() has to be
        called at the beginning of a line. This method does not send a newline.
        It is the responsibility of the caller to ensure the eof is sent at the
        beginning of a line.  N/A N/A hasattr termios VEOF N/A N/A char N/A N/A N/A N/A termios tcgetattr N/A self child_fd N/A 6 N/A N/A termios VEOF N/A N/A char N/A chr 4 N/A N/A N/A self send char N/A sendintr N/A N/A self N/A N/A N/A This sends a SIGINT to the child. It does not require
        the SIGINT to be the first character on a line.  N/A N/A hasattr termios VINTR N/A N/A char N/A N/A N/A N/A termios tcgetattr N/A self child_fd N/A 6 N/A N/A termios VINTR N/A N/A char N/A chr 3 N/A N/A N/A self send char N/A eof N/A N/A self N/A N/A N/A This returns True if the EOF exception was ever raised.
         N/A N/A self flag_eof N/A terminate N/A N/A self force N/A False N/A N/A This forces a child process to terminate. It starts nicely with
        SIGHUP and SIGINT. If "force" is True then moves onto SIGKILL. This
        returns True if the child was terminated. This returns False if the
        child could not be terminated.  N/A N/A N/A N/A self isalive N/A N/A True N/A N/A N/A N/A N/A self kill N/A signal SIGHUP N/A N/A N/A time sleep N/A self delayafterterminate N/A N/A N/A N/A self isalive N/A N/A True N/A N/A N/A self kill N/A signal SIGCONT N/A N/A N/A time sleep N/A self delayafterterminate N/A N/A N/A N/A self isalive N/A N/A True N/A N/A N/A self kill N/A signal SIGINT N/A N/A N/A time sleep N/A self delayafterterminate N/A N/A N/A N/A self isalive N/A N/A True N/A force N/A N/A N/A N/A self kill N/A signal SIGKILL N/A N/A N/A time sleep N/A self delayafterterminate N/A N/A N/A N/A self isalive N/A N/A True N/A N/A False N/A False N/A N/A N/A OSError N/A e N/A N/A N/A N/A time sleep N/A self delayafterterminate N/A N/A N/A N/A self isalive N/A N/A True N/A N/A False N/A wait N/A N/A self N/A N/A N/A This waits until the child exits. This is a blocking call. This will
        not read any data from the child, so this will block forever if the
        child has unread output and has terminated. In other words, the child
        may have printed output then called exit(); but, technically, the child
        is still alive until its output is read.  N/A N/A N/A self isalive N/A N/A N/A pid status N/A N/A os waitpid N/A self pid 0 N/A N/A N/A ExceptionPexpect Cannot wait for dead child process. N/A N/A self exitstatus N/A N/A os WEXITSTATUS status N/A N/A N/A os WIFEXITED status N/A N/A N/A self status status N/A N/A self exitstatus N/A N/A os WEXITSTATUS status N/A N/A self signalstatus None N/A N/A self terminated True N/A N/A N/A N/A os WIFSIGNALED status N/A N/A N/A self status status N/A N/A self exitstatus None N/A N/A self signalstatus N/A N/A os WTERMSIG status N/A N/A self terminated True N/A N/A N/A N/A os WIFSTOPPED status N/A N/A N/A ExceptionPexpect Wait was called for a child process that is stopped. This is not supported. Is some other process attempting job control with our child pid? N/A N/A self exitstatus N/A isalive N/A N/A self N/A N/A N/A This tests if the child process is running or not. This is
        non-blocking. If the child was terminated then this will read the
        exitstatus or signalstatus of the child. This returns True if the child
        process appears to be running or False if not. It can take literally
        SECONDS for Solaris to return the right status.  N/A N/A self terminated N/A N/A False N/A N/A self flag_eof N/A N/A waitpid_options 0 N/A N/A waitpid_options N/A os WNOHANG N/A N/A N/A N/A pid status N/A N/A os waitpid N/A self pid waitpid_options N/A N/A N/A OSError N/A e N/A N/A N/A N/A e N/A 0 N/A errno ECHILD N/A N/A N/A ExceptionPexpect isalive() encountered condition where "terminated" is 0, but there was no child process. Did someone else call waitpid() on our process? N/A N/A e N/A N/A pid 0 N/A N/A N/A N/A N/A pid status N/A N/A os waitpid N/A self pid waitpid_options N/A N/A N/A OSError N/A e N/A N/A N/A N/A e N/A 0 N/A errno ECHILD N/A N/A N/A ExceptionPexpect isalive() encountered condition that should never happen. There was no child process. Did someone else call waitpid() on our process? N/A N/A e N/A N/A pid 0 N/A N/A True N/A N/A pid 0 N/A N/A True N/A N/A N/A os WIFEXITED status N/A N/A N/A self status status N/A N/A self exitstatus N/A N/A os WEXITSTATUS status N/A N/A self signalstatus None N/A N/A self terminated True N/A N/A N/A N/A os WIFSIGNALED status N/A N/A N/A self status status N/A N/A self exitstatus None N/A N/A self signalstatus N/A N/A os WTERMSIG status N/A N/A self terminated True N/A N/A N/A N/A os WIFSTOPPED status N/A N/A N/A ExceptionPexpect isalive() encountered condition where child process is stopped. This is not supported. Is some other process attempting job control with our child pid? N/A False N/A kill N/A N/A self sig N/A N/A N/A This sends the given signal to the child application. In keeping
        with UNIX tradition it has a misleading name. It does not necessarily
        kill the child unless you send the right signal.  N/A N/A N/A self isalive N/A N/A N/A N/A os kill N/A self pid sig N/A compile_pattern_list N/A N/A self patterns N/A N/A N/A This compiles a pattern-string or a list of pattern-strings.
        Patterns must be a StringType, EOF, TIMEOUT, SRE_Pattern, or a list of
        those. Patterns may also be None which results in an empty list (you
        might do this if waiting for an EOF or TIMEOUT condition without
        expecting any pattern).

        This is used by expect() when calling expect_list(). Thus expect() is
        nothing more than::

             cpl = self.compile_pattern_list(pl)
             return self.expect_list(cpl, timeout)

        If you are using expect() within a loop it may be more
        efficient to compile the patterns first and then call expect_list().
        This avoid calls in a loop to compile_pattern_list()::

             cpl = self.compile_pattern_list(my_pattern)
             while some_condition:
                ...
                i = self.expect_list(clp, timeout)
                ...
         N/A N/A patterns None N/A N/A N/A N/A N/A N/A type patterns N/A types ListType N/A N/A patterns N/A patterns N/A compile_flags N/A re DOTALL N/A N/A self ignorecase N/A N/A compile_flags N/A compile_flags N/A re IGNORECASE N/A compiled_pattern_list N/A N/A p patterns N/A N/A N/A N/A type p N/A types StringTypes N/A N/A N/A N/A compiled_pattern_list append N/A N/A re compile p compile_flags N/A N/A N/A p EOF N/A N/A N/A N/A compiled_pattern_list append EOF N/A N/A N/A p TIMEOUT N/A N/A N/A N/A compiled_pattern_list append TIMEOUT N/A N/A N/A N/A type p N/A type N/A N/A re compile N/A N/A N/A N/A compiled_pattern_list append p N/A N/A N/A TypeError N/A Argument must be one of StringTypes, EOF, TIMEOUT, SRE_Pattern, or a list of those type. %s N/A str N/A type p N/A compiled_pattern_list N/A expect N/A N/A self pattern timeout searchwindowsize N/A -1 None N/A N/A This seeks through the stream until a pattern is matched. The
        pattern is overloaded and may take several types. The pattern can be a
        StringType, EOF, a compiled re, or a list of any of those types.
        Strings will be compiled to re types. This returns the index into the
        pattern list. If the pattern was not a list this returns index 0 on a
        successful match. This may raise exceptions for EOF or TIMEOUT. To
        avoid the EOF or TIMEOUT exceptions add EOF or TIMEOUT to the pattern
        list. That will cause expect to match an EOF or TIMEOUT condition
        instead of raising an exception.

        If you pass a list of patterns and more than one matches, the first match
        in the stream is chosen. If more than one pattern matches at that point,
        the leftmost in the pattern list is chosen. For example::

            # the input is 'foobar'
            index = p.expect (['bar', 'foo', 'foobar'])
            # returns 1 ('foo') even though 'foobar' is a "better" match

        Please note, however, that buffering can affect this behavior, since
        input arrives in unpredictable chunks. For example::

            # the input is 'foobar'
            index = p.expect (['foobar', 'foo'])
            # returns 0 ('foobar') if all input is available at once,
            # but returs 1 ('foo') if parts of the final 'bar' arrive late

        After a match is found the instance attributes 'before', 'after' and
        'match' will be set. You can see all the data read before the match in
        'before'. You can see the data that was matched in 'after'. The
        re.MatchObject used in the re match will be in 'match'. If an error
        occurred then 'before' will be set to all the data read so far and
        'after' and 'match' will be None.

        If timeout is -1 then timeout will be set to the self.timeout value.

        A list entry may be EOF or TIMEOUT instead of a string. This will
        catch these exceptions and return the index of the list entry instead
        of raising the exception. The attribute 'after' will be set to the
        exception type. The attribute 'match' will be None. This allows you to
        write code like this::

                index = p.expect (['good', 'bad', pexpect.EOF, pexpect.TIMEOUT])
                if index == 0:
                    do_something()
                elif index == 1:
                    do_something_else()
                elif index == 2:
                    do_some_other_thing()
                elif index == 3:
                    do_something_completely_different()

        instead of code like this::

                try:
                    index = p.expect (['good', 'bad'])
                    if index == 0:
                        do_something()
                    elif index == 1:
                        do_something_else()
                except EOF:
                    do_some_other_thing()
                except TIMEOUT:
                    do_something_completely_different()

        These two forms are equivalent. It all depends on what you want. You
        can also just expect the EOF if you are waiting for all output of a
        child to finish. For example::

                p = pexpect.spawn('/bin/ls')
                p.expect (pexpect.EOF)
                print p.before

        If you are trying to optimize for speed then see expect_list().
         N/A compiled_pattern_list N/A N/A self compile_pattern_list pattern N/A N/A N/A self expect_list compiled_pattern_list timeout searchwindowsize N/A expect_list N/A N/A self pattern_list timeout searchwindowsize N/A -1 -1 N/A N/A This takes a list of compiled regular expressions and returns the
        index into the pattern_list that matched the child output. The list may
        also contain EOF or TIMEOUT (which are not compiled regular
        expressions). This method is similar to the expect() method except that
        expect_list() does not recompile the pattern list on every call. This
        may help if you are trying to optimize for speed, otherwise just use
        the expect() method.  This is called by expect(). If timeout==-1 then
        the self.timeout value is used. If searchwindowsize==-1 then the
        self.searchwindowsize value is used.  N/A N/A N/A self expect_loop N/A searcher_re pattern_list timeout searchwindowsize N/A expect_exact N/A N/A self pattern_list timeout searchwindowsize N/A -1 -1 N/A N/A This is similar to expect(), but uses plain string matching instead
        of compiled regular expressions in 'pattern_list'. The 'pattern_list'
        may be a string; a list or other sequence of strings; or TIMEOUT and
        EOF.

        This call might be faster than expect() for two reasons: string
        searching is faster than RE matching and it is possible to limit the
        search to just the end of the input buffer.

        This method is also useful when you don't want to have to worry about
        escaping regular expression characters that you want to match. N/A N/A N/A N/A type pattern_list N/A types StringTypes N/A pattern_list N/A TIMEOUT EOF N/A N/A pattern_list N/A pattern_list N/A N/A N/A self expect_loop N/A searcher_string pattern_list timeout searchwindowsize N/A expect_loop N/A N/A self searcher timeout searchwindowsize N/A -1 -1 N/A N/A This is the common loop used inside expect. The 'searcher' should be
        an instance of searcher_re or searcher_string, which describes how and what
        to search for in the input.

        See expect() for other arguments, return value and exceptions.  N/A N/A self searcher searcher N/A N/A timeout -1 N/A N/A timeout N/A self timeout N/A N/A timeout None N/A N/A end_time N/A N/A N/A time time timeout N/A N/A searchwindowsize -1 N/A N/A searchwindowsize N/A self searchwindowsize N/A N/A N/A incoming N/A self buffer N/A freshlen N/A len incoming N/A True N/A N/A index N/A N/A searcher search incoming freshlen searchwindowsize N/A N/A index 0 N/A N/A N/A self buffer N/A incoming N/A N/A searcher end N/A N/A self before N/A incoming N/A N/A searcher start N/A N/A self after N/A incoming N/A N/A searcher start N/A searcher end N/A N/A self match N/A searcher match N/A N/A self match_index index N/A N/A self match_index N/A N/A N/A timeout 0 N/A timeout None N/A N/A N/A TIMEOUT Timeout exceeded in expect_any(). N/A c N/A N/A self read_nonblocking N/A self maxread timeout N/A freshlen N/A len c N/A N/A N/A time sleep 0.0001 N/A incoming N/A incoming c N/A N/A timeout None N/A N/A timeout N/A end_time N/A N/A time time N/A N/A N/A EOF N/A e N/A N/A N/A self buffer N/A N/A self before incoming N/A N/A self after EOF N/A index N/A searcher eof_index N/A N/A index 0 N/A N/A N/A self match EOF N/A N/A self match_index index N/A N/A self match_index N/A N/A N/A self match None N/A N/A self match_index None N/A N/A EOF N/A N/A N/A str e N/A str self N/A N/A TIMEOUT N/A e N/A N/A N/A self buffer incoming N/A N/A self before incoming N/A N/A self after TIMEOUT N/A index N/A searcher timeout_index N/A N/A index 0 N/A N/A N/A self match TIMEOUT N/A N/A self match_index index N/A N/A self match_index N/A N/A N/A self match None N/A N/A self match_index None N/A N/A TIMEOUT N/A N/A N/A str e N/A str self N/A N/A N/A N/A self before incoming N/A N/A self after None N/A N/A self match None N/A N/A self match_index None N/A N/A getwinsize N/A N/A self N/A N/A N/A This returns the terminal window size of the child tty. The return
        value is a tuple of (rows, cols).  N/A TIOCGWINSZ N/A getattr termios TIOCGWINSZ 1074295912 N/A s N/A N/A struct pack HHHH 0 0 0 0 N/A x N/A N/A fcntl ioctl N/A N/A self fileno TIOCGWINSZ s N/A N/A N/A N/A struct unpack HHHH x N/A 0 2 N/A setwinsize N/A N/A self r c N/A N/A N/A This sets the terminal window size of the child tty. This will cause
        a SIGWINCH signal to be sent to the child. This does not change the
        physical window size. It changes the size reported to TTY-aware
        applications like vi or curses -- applications that respond to the
        SIGWINCH signal.  N/A TIOCSWINSZ N/A getattr termios TIOCSWINSZ -2146929561 N/A N/A TIOCSWINSZ 2148037735 N/A N/A TIOCSWINSZ -2146929561 N/A s N/A N/A struct pack HHHH r c 0 0 N/A N/A N/A fcntl ioctl N/A N/A self fileno TIOCSWINSZ s N/A interact N/A N/A self escape_character input_filter output_filter N/A N/A chr 29 None None N/A N/A This gives control of the child process to the interactive user (the
        human at the keyboard). Keystrokes are sent to the child process, and
        the stdout and stderr output of the child process is printed. This
        simply echos the child stdout and child stderr to the real stdout and
        it echos the real stdin to the child stdin. When the user types the
        escape_character this method will stop. The default for
        escape_character is ^]. This should not be confused with ASCII 27 --
        the ESC character. ASCII 29 was chosen for historical merit because
        this is the character used by 'telnet' as the escape character. The
        escape_character will not be sent to the child process.

        You may pass in optional input and output filter functions. These
        functions should take a string and return a string. The output_filter
        will be passed all the output from the child process. The input_filter
        will be passed all the keyboard input from the user. The input_filter
        is run BEFORE the check for the escape_character.

        Note that if you change the window size of the parent the SIGWINCH
        signal will not be passed through to the child. If you want the child
        window size to change when the parent's window size changes then do
        something like the following example::

            import pexpect, struct, fcntl, termios, signal, sys
            def sigwinch_passthrough (sig, data):
                s = struct.pack("HHHH", 0, 0, 0, 0)
                a = struct.unpack('hhhh', fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ , s))
                global p
                p.setwinsize(a[0],a[1])
            p = pexpect.spawn('/bin/bash') # Note this is global and used in sigwinch_passthrough.
            signal.signal(signal.SIGWINCH, sigwinch_passthrough)
            p.interact()
         N/A N/A N/A N/A self stdout write N/A self buffer N/A N/A N/A N/A self stdout flush N/A N/A self buffer N/A mode N/A N/A tty tcgetattr N/A self STDIN_FILENO N/A N/A N/A tty setraw N/A self STDIN_FILENO N/A N/A N/A N/A N/A self __interact_copy escape_character input_filter output_filter N/A N/A N/A N/A tty tcsetattr N/A self STDIN_FILENO N/A tty TCSAFLUSH mode N/A __interact_writen N/A N/A self fd data N/A N/A N/A This is used by the interact() method.
         N/A N/A N/A data N/A N/A self isalive N/A N/A n N/A N/A os write fd data N/A data N/A data N/A n N/A __interact_read N/A N/A self fd N/A N/A N/A This is used by the interact() method.
         N/A N/A N/A os read fd 1000 N/A __interact_copy N/A N/A self escape_character input_filter output_filter N/A None None None N/A N/A This is used by the interact() method.
         N/A N/A N/A self isalive N/A N/A N/A r w e N/A N/A self __select N/A N/A self child_fd N/A self STDIN_FILENO N/A N/A N/A N/A N/A self child_fd r N/A N/A data N/A N/A self __interact_read N/A self child_fd N/A output_filter N/A N/A data N/A output_filter data N/A N/A N/A self logfile None N/A N/A N/A N/A N/A self logfile write data N/A N/A N/A N/A self logfile flush N/A N/A N/A os write N/A self STDOUT_FILENO data N/A N/A N/A self STDIN_FILENO r N/A N/A data N/A N/A self __interact_read N/A self STDIN_FILENO N/A input_filter N/A N/A data N/A input_filter data N/A i N/A N/A data rfind escape_character N/A N/A i -1 N/A N/A data N/A data N/A i N/A N/A N/A self __interact_writen N/A self child_fd data N/A N/A N/A N/A self __interact_writen N/A self child_fd data N/A __select N/A N/A self iwtd owtd ewtd timeout N/A None N/A N/A This is a wrapper around select.select() that ignores signals. If
        select.select raises a select.error exception and errno is an EINTR
        error then it is ignored. Mainly this is used to ignore sigwinch
        (terminal resize).  N/A N/A timeout None N/A N/A end_time N/A N/A N/A time time timeout N/A True N/A N/A N/A N/A N/A N/A select select iwtd owtd ewtd timeout N/A N/A N/A N/A select error N/A e N/A N/A N/A N/A e N/A 0 N/A errno EINTR N/A N/A N/A timeout None N/A N/A timeout N/A end_time N/A N/A time time N/A N/A timeout 0 N/A N/A N/A N/A N/A N/A N/A N/A N/A setmaxread N/A N/A self maxread N/A N/A N/A This method is no longer supported or allowed. I don't like getters
        and setters without a good reason.  N/A N/A ExceptionPexpect This method is no longer supported or allowed. Just assign a value to the maxread member variable. N/A setlog N/A N/A self fileobject N/A N/A N/A This method is no longer supported or allowed.
         N/A N/A ExceptionPexpect This method is no longer supported or allowed. Just assign a value to the logfile member variable. N/A N/A searcher_string N/A object N/A N/A This is a plain string search helper for the spawn.expect_any() method.

    Attributes:

        eof_index     - index of EOF, or -1
        timeout_index - index of TIMEOUT, or -1

    After a successful match by the search() method the following attributes
    are available:

        start - index into the buffer, first byte of match
        end   - index into the buffer, first byte after match
        match - the matching string itself
     __init__ N/A N/A self strings N/A N/A N/A This creates an instance of searcher_string. This argument 'strings'
        may be a list; a sequence of strings; or the EOF or TIMEOUT types.  N/A N/A self eof_index -1 N/A N/A self timeout_index -1 N/A N/A self _strings N/A N/A N/A n s N/A zip N/A range N/A len strings strings N/A N/A N/A s EOF N/A N/A N/A self eof_index n N/A N/A N/A s TIMEOUT N/A N/A N/A self timeout_index n N/A N/A N/A N/A N/A self _strings append N/A n s N/A __str__ N/A N/A self N/A N/A N/A This returns a human-readable string that represents the state of
        the object. N/A ss N/A N/A N/A ns N/A 0 N/A     %d: "%s" ns N/A ns N/A self _strings N/A N/A N/A ss append N/A -1 searcher_string: N/A N/A N/A self eof_index 0 N/A N/A N/A N/A ss append N/A N/A self eof_index N/A     %d: EOF N/A self eof_index N/A N/A N/A self timeout_index 0 N/A N/A N/A N/A ss append N/A N/A self timeout_index N/A     %d: TIMEOUT N/A self timeout_index N/A N/A N/A ss sort N/A ss N/A N/A zip ss N/A 1 N/A N/A N/A join ss N/A search N/A N/A self buffer freshlen searchwindowsize N/A None N/A N/A This searches 'buffer' for the first occurence of one of the search
        strings.  'freshlen' must indicate the number of bytes at the end of
        'buffer' which have not been searched before. It helps to avoid
        searching the same, possibly big, buffer over and over again.

        See class spawn for the 'searchwindowsize' argument.

        If there is a match this returns the index of that string, and sets
        'start', 'end' and 'match'. Otherwise, this returns -1.  N/A absurd_match N/A len buffer N/A first_match absurd_match N/A N/A index s N/A self _strings N/A N/A N/A searchwindowsize None N/A N/A offset N/A N/A freshlen N/A len s N/A N/A offset N/A searchwindowsize N/A n N/A N/A buffer find s offset N/A N/A N/A n 0 N/A n first_match N/A N/A first_match n N/A N/A best_index best_match N/A index s N/A N/A first_match absurd_match N/A N/A -1 N/A N/A self match best_match N/A N/A self start first_match N/A N/A self end N/A N/A self start N/A len N/A self match N/A best_index N/A N/A searcher_re N/A object N/A N/A This is regular expression string search helper for the
    spawn.expect_any() method.

    Attributes:

        eof_index     - index of EOF, or -1
        timeout_index - index of TIMEOUT, or -1

    After a successful match by the search() method the following attributes
    are available:

        start - index into the buffer, first byte of match
        end   - index into the buffer, first byte after match
        match - the re.match object returned by a succesful re.search

     __init__ N/A N/A self patterns N/A N/A N/A This creates an instance that searches for 'patterns' Where
        'patterns' may be a list or other sequence of compiled regular
        expressions, or the EOF or TIMEOUT types. N/A N/A self eof_index -1 N/A N/A self timeout_index -1 N/A N/A self _searches N/A N/A N/A n s N/A zip N/A range N/A len patterns patterns N/A N/A N/A s EOF N/A N/A N/A self eof_index n N/A N/A N/A s TIMEOUT N/A N/A N/A self timeout_index n N/A N/A N/A N/A N/A self _searches append N/A n s N/A __str__ N/A N/A self N/A N/A N/A This returns a human-readable string that represents the state of
        the object. N/A ss N/A N/A n N/A     %d: re.compile("%s") N/A n N/A str N/A s pattern N/A N/A n s N/A self _searches N/A N/A N/A ss append N/A -1 searcher_re: N/A N/A N/A self eof_index 0 N/A N/A N/A N/A ss append N/A N/A self eof_index N/A     %d: EOF N/A self eof_index N/A N/A N/A self timeout_index 0 N/A N/A N/A N/A ss append N/A N/A self timeout_index N/A     %d: TIMEOUT N/A self timeout_index N/A N/A N/A ss sort N/A ss N/A N/A zip ss N/A 1 N/A N/A N/A join ss N/A search N/A N/A self buffer freshlen searchwindowsize N/A None N/A N/A This searches 'buffer' for the first occurence of one of the regular
        expressions. 'freshlen' must indicate the number of bytes at the end of
        'buffer' which have not been searched before.

        See class spawn for the 'searchwindowsize' argument.
        
        If there is a match this returns the index of that string, and sets
        'start', 'end' and 'match'. Otherwise, returns -1. N/A absurd_match N/A len buffer N/A first_match absurd_match N/A N/A searchwindowsize None N/A N/A searchstart 0 N/A N/A searchstart N/A max 0 N/A N/A len buffer searchwindowsize N/A N/A index s N/A self _searches N/A N/A match N/A N/A s search buffer searchstart N/A N/A match None N/A N/A N/A n N/A N/A match start N/A N/A n first_match N/A N/A first_match n N/A the_match match N/A best_index index N/A N/A first_match absurd_match N/A N/A -1 N/A N/A self start first_match N/A N/A self match the_match N/A N/A self end N/A N/A N/A self match end N/A best_index N/A N/A which N/A N/A filename N/A N/A N/A This takes a given filename; tries to find it in the environment path;
    then checks if it is executable. This returns the full path to the filename
    if found and executable. Otherwise this returns None. N/A N/A N/A N/A N/A os path dirname filename N/A N/A N/A N/A os access filename N/A os X_OK N/A N/A filename N/A N/A N/A N/A N/A N/A os environ has_key PATH N/A N/A N/A os environ N/A PATH N/A N/A p N/A os defpath N/A N/A p N/A N/A os environ N/A PATH N/A pathlist N/A N/A string split p N/A os pathsep N/A path pathlist N/A N/A f N/A N/A N/A os path join path filename N/A N/A N/A os access f N/A os X_OK N/A N/A f N/A None N/A split_command_line N/A N/A command_line N/A N/A N/A This splits a command line into a list of arguments. It splits arguments
    on spaces, but handles embedded quotes, doublequotes, and escaped
    characters. It's impossible to do this with a regular expression, so I
    wrote a little state machine to parse the command line.  N/A arg_list N/A N/A arg N/A state_basic 0 N/A state_esc 1 N/A state_singlequote 2 N/A state_doublequote 3 N/A state_whitespace 4 N/A state state_basic N/A c command_line N/A N/A N/A N/A state state_basic N/A state state_whitespace N/A N/A N/A c \ N/A N/A state state_esc N/A N/A N/A c ' N/A N/A state state_singlequote N/A N/A N/A c " N/A N/A state state_doublequote N/A N/A N/A N/A c isspace N/A N/A N/A state state_whitespace N/A N/A None N/A N/A N/A N/A arg_list append arg N/A arg N/A state state_whitespace N/A N/A arg N/A arg c N/A state state_basic N/A N/A N/A state state_esc N/A N/A arg N/A arg c N/A state state_basic N/A N/A N/A state state_singlequote N/A N/A N/A c ' N/A N/A state state_basic N/A N/A arg N/A arg c N/A N/A N/A state state_doublequote N/A N/A N/A c " N/A N/A state state_basic N/A N/A arg N/A arg c N/A N/A arg N/A N/A N/A N/A arg_list append arg N/A arg_list N/A