Module Expr Str ImportFrom alias alias alias Import alias Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias identifier alias identifier alias identifier If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body ImportFrom alias Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str ListLoad Str Str Str Str Str Str Assign NameStore Call NameLoad Str ListLoad Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad NameLoad NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Call NameLoad Str body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad keyword Str keyword Str keyword Str Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad Str attr Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Slice GeneratorExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Num BinOpSub AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad Num AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Num Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad AttributeLoad NameLoad attr Assign NameStore BoolOpOr NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr GeneratorExp Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore Call NameLoad NameLoad Num orelse If CompareGt NameLoad Num body Assign SubscriptStore AttributeLoad NameLoad attr Slice NameLoad TupleLoad Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad Num body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr orelse If CompareGt NameLoad Num body For NameStore AttributeLoad NameLoad attr body Delete SubscriptDel NameLoad Slice NameLoad Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Num BinOpSub AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return Assign NameStore Call NameLoad Num Call NameLoad BinOpSub NameLoad Num BinOpSub AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Num Call NameLoad BinOpSub NameLoad Num BinOpSub AttributeLoad NameLoad attr Num If CompareGtE BinOpSub NameLoad NameLoad Num body Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad SubscriptLoad Dict Str Str Str Str Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore ListComp BinOpLShift NameLoad Num comprehension NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Slice GeneratorExp ListComp Call AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore NameLoad comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIn AttributeLoad NameLoad attr NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore ListComp BinOpLShift NameLoad Num comprehension NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Slice GeneratorExp ListComp Call AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore NameLoad comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIn AttributeLoad NameLoad attr NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse AugAssignSub AttributeStore AttributeLoad NameLoad attr attr Num If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareLt AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad Break orelse Assign NameStore BinOpSub AttributeLoad NameLoad attr Num Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Num Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareLtELtE NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad body For NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad BinOpAdd NameLoad Num BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Num Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareLtELtE NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad body For NameStore Call NameLoad Call NameLoad BinOpAdd BinOpSub NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Num For NameStore Call NameLoad Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Num For NameStore Call NameLoad Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Num For NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore SubscriptLoad TupleLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad Num BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr Num Call NameLoad Num AttributeLoad NameLoad attr Index NameLoad For NameStore NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore SubscriptLoad TupleLoad Call NameLoad BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr Call NameLoad Num AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Num AttributeLoad NameLoad attr Index NameLoad For NameStore NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Slice GeneratorExp AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore Call NameLoad AttributeLoad NameLoad attr If CompareIn NameLoad ListLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr orelse If CompareEq NameLoad Num body Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If BoolOpOr NameLoad CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr orelse Assign TupleStore NameStore NameStore TupleLoad Num BinOpSub AttributeLoad NameLoad attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad Num AttributeLoad AttributeLoad NameLoad attr attr BinOpSub AttributeLoad NameLoad attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str AugAssignSub AttributeStore AttributeLoad NameLoad attr attr BoolOpOr NameLoad Num Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr BoolOpOr NameLoad Num Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str AugAssignSub AttributeStore AttributeLoad NameLoad attr attr BoolOpOr NameLoad Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr BoolOpOr NameLoad Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore BinOpSub BoolOpOr NameLoad Num Num Assign NameStore BinOpSub BoolOpOr NameLoad Num Num If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignAdd NameStore AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot CompareLtELtE AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Return Assign TupleStore AttributeStore AttributeLoad NameLoad attr attr AttributeStore AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr BinOpSub BoolOpOr NameLoad Num Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr BinOpSub BoolOpOr NameLoad Num Num If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword Str decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Dict For NameStore BoolOpOr NameLoad ListLoad Num body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Slice Num Call AttributeLoad NameLoad attr Str orelse If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg body Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If BoolOpAnd CompareIn BinOpRShift AttributeLoad NameLoad attr Num NameLoad Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If BoolOpAnd CompareIn BinOpRShift AttributeLoad NameLoad attr Num NameLoad Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad TupleLoad Call NameLoad BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr Call NameLoad Num AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Num AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad keyword BinOpFloorDiv NameLoad Num Call NameLoad keyword NameLoad Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad ListLoad Str Str body While CompareLt AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad ListLoad Str Str body For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareGt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr orelse If CompareLt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpAdd NameLoad Call NameLoad BinOpSub AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr UnaryOpNot BoolOpAnd CompareLt Call NameLoad BinOpSub AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd CompareGt AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice UnaryOpUSub NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpSub AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Slice BinOpAdd Call NameLoad Call NameLoad ListComp Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr comprehension NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice UnaryOpUSub NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd CompareLt AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Slice BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad ListComp Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr comprehension NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
    pyte.screens
    ~~~~~~~~~~~~

    This module provides classes for terminal screens, currently
    it contains three screens with different features:

    * :class:`~pyte.screens.Screen` -- base screen implementation,
      which handles all the core escape sequences, recognized by
      :class:`~pyte.streams.Stream`.
    * If you need a screen to keep track of the changed lines
      (which you probably do need) -- use
      :class:`~pyte.screens.DiffScreen`.
    * If you also want a screen to collect history and allow
      pagination -- :class:`pyte.screen.HistoryScreen` is here
      for ya ;)

    .. note:: It would be nice to split those features into mixin
              classes, rather than subclasses, but it's not obvious
              how to do -- feel free to submit a pull request.

    :copyright: (c) 2011-2013 Selectel, see AUTHORS for details.
    :license: LGPL, see LICENSE for more details.
 __future__ absolute_import unicode_literals division N/A copy N/A math N/A operator N/A sys collections deque namedtuple itertools islice repeat N/A modes mo graphics g charsets cs N/A N/A N/A N/A sys version_info N/A 0 2 N/A future_builtins map N/A range xrange take N/A N/A n iterable N/A N/A N/A Returns first n items of the iterable as a list. N/A N/A list N/A islice iterable n N/A N/A Margins N/A namedtuple Margins top bottom N/A Savepoint N/A namedtuple Savepoint N/A cursor g0_charset g1_charset charset origin wrap N/A _Char N/A namedtuple _Char N/A data fg bg bold italics underscore strikethrough reverse Char N/A _Char N/A N/A A wrapper around :class:`_Char`, providing some useful defaults
    for most of the attributes.
     N/A __slots__ N/A __new__ N/A N/A cls data fg bg bold italics underscore reverse strikethrough N/A default default False False False False False N/A N/A N/A N/A _Char __new__ cls data fg bg bold italics underscore strikethrough reverse N/A N/A Cursor N/A object N/A N/A Screen cursor.

    :param int x: horizontal cursor position.
    :param int y: vertical cursor position.
    :param pyte.screens.Char attrs: cursor attributes (see
        :meth:`~pyte.screens.Screen.selectel_graphic_rendition`
        for details).
     __init__ N/A N/A self x y attrs N/A N/A Char N/A N/A N/A N/A self x N/A self y N/A self attrs N/A self hidden N/A x y attrs False N/A N/A Screen N/A object N/A N/A 
    A screen is an in-memory matrix of characters that represents the
    screen display of the terminal. It can be instantiated on it's own
    and given explicit commands, or it can be attached to a stream and
    will respond to events.

    .. attribute:: buffer

       A ``lines x columns`` :class:`~pyte.screens.Char` matrix.

    .. attribute:: cursor

       Reference to the :class:`~pyte.screens.Cursor` object, holding
       cursor position and attributes.

    .. attribute:: margins

       Top and bottom screen margins, defining the scrolling region;
       the actual values are top and bottom line.

    .. attribute:: charset

       Current charset number; can be either ``0`` or ``1`` for `G0`
       and `G1` respectively, note that `G0` is activated by default.

    .. note::

       According to ``ECMA-48`` standard, **lines and columnns are
       1-indexed**, so, for instance ``ESC [ 10;10 f`` really means
       -- move cursor to position (9, 9) in the display matrix.

    .. versionchanged:: 0.4.7
    .. warning::

       :data:`~pyte.modes.LNM` is reset by default, to match VT220
       specification.

    .. versionchanged:: 0.4.8
    .. warning::

       If `DECAWM` mode is set than a cursor will be wrapped to the
       **beginning* of the next line, which is the behaviour described
       in ``man console_codes``.

    .. seealso::

       `Standard ECMA-48, Section 6.1.1        <http://www.ecma-international.org/publications
       /standards/Ecma-048.htm>`_
         For a description of the presentational component, implemented
         by ``Screen``.
     N/A default_char N/A Char data fg default bg default N/A default_line N/A repeat default_char __init__ N/A N/A self columns lines N/A N/A N/A N/A self savepoints N/A N/A N/A N/A self lines N/A self columns N/A lines columns N/A N/A self buffer N/A N/A N/A N/A self reset N/A __repr__ N/A N/A self N/A N/A N/A N/A N/A {0}({1}, {2}) format N/A N/A self __class__ __name__ N/A self columns N/A self lines N/A __before__ N/A N/A self command N/A N/A N/A Hook, called **before** a command is dispatched to the
        :class:`Screen` instance.

        :param str command: command name, for example ``"LINEFEED"``.
         N/A __after__ N/A N/A self command N/A N/A N/A Hook, called **after** a command is dispatched to the
        :class:`Screen` instance.

        :param str command: command name, for example ``"LINEFEED"``.
         N/A size N/A N/A self N/A N/A N/A Returns screen size -- ``(lines, columns)`` N/A N/A N/A self lines N/A self columns N/A property display N/A N/A self N/A N/A N/A Returns a :func:`list` of screen lines as unicode strings. N/A N/A N/A N/A join N/A map N/A N/A operator attrgetter data line N/A line N/A self buffer N/A property reset N/A N/A self N/A N/A N/A Resets the terminal to its initial state.

        * Scroll margins are reset to screen boundaries.
        * Cursor is moved to home location -- ``(0, 0)`` and its
          attributes are set to defaults (see :attr:`default_char`).
        * Screen is cleared -- each character is reset to
          :attr:`default_char`.
        * Tabstops are reset to "every eight columns".

        .. note::

           Neither VT220 nor VT102 manuals mentioned that terminal modes
           and tabstops should be reset as well, thanks to
           :manpage:`xterm` -- we now know that.
         N/A N/A N/A self buffer N/A N/A N/A take N/A self columns N/A self default_line N/A _ N/A range N/A self lines N/A N/A self mode N/A set N/A N/A mo DECAWM N/A mo DECTCEM N/A N/A self margins N/A Margins 0 N/A N/A self lines 1 N/A N/A self charset 0 N/A N/A self g0_charset N/A cs IBMPC_MAP N/A N/A self g1_charset N/A cs VT100_MAP N/A N/A self tabstops N/A set N/A range 7 N/A self columns 8 N/A N/A self cursor N/A Cursor 0 0 N/A N/A N/A self cursor_position N/A resize N/A N/A self lines columns N/A None None N/A N/A Resize the screen to the given dimensions.

        If the requested screen size has more lines than the existing
        screen, lines will be added at the bottom. If the requested
        size has less lines than the existing screen lines will be
        clipped at the top of the screen. Similarly, if the existing
        screen has less columns than the requested screen, columns will
        be added at the right, and if it has more -- columns will be
        clipped at the right.

        .. note:: According to `xterm`, we should also reset origin
                  mode and screen margins, see ``xterm/screen.c:1761``.

        :param int lines: number of lines in the new screen.
        :param int columns: number of columns in the new screen.
         N/A lines N/A lines N/A self lines N/A columns N/A columns N/A self columns N/A diff N/A N/A self lines lines N/A N/A diff 0 N/A N/A N/A N/A N/A self buffer extend N/A N/A take N/A self columns N/A self default_line N/A _ N/A range diff 0 N/A N/A N/A diff 0 N/A N/A N/A N/A self buffer N/A diff N/A N/A diff N/A N/A self columns columns N/A N/A diff 0 N/A N/A y N/A range lines N/A N/A N/A N/A N/A N/A self buffer N/A y extend N/A take N/A abs diff N/A self default_line N/A N/A N/A diff 0 N/A N/A line N/A self buffer N/A N/A N/A line N/A columns N/A N/A N/A self lines N/A self columns N/A lines columns N/A N/A self margins N/A Margins 0 N/A N/A self lines 1 N/A N/A N/A self reset_mode N/A mo DECOM N/A set_margins N/A N/A self top bottom N/A None None N/A N/A Selects top and bottom margins for the scrolling region.

        Margins determine which screen lines move during scrolling
        (see :meth:`index` and :meth:`reverse_index`). Characters added
        outside the scrolling region do not cause the screen to scroll.

        :param int top: the smallest line number that is scrolled.
        :param int bottom: the biggest line number that is scrolled.
         N/A N/A N/A top None N/A bottom None N/A N/A N/A top N/A max 0 N/A min N/A top 1 N/A N/A self lines 1 N/A bottom N/A max 0 N/A min N/A bottom 1 N/A N/A self lines 1 N/A N/A N/A bottom top 1 N/A N/A N/A self margins N/A Margins top bottom N/A N/A N/A self cursor_position N/A set_charset N/A N/A self code mode N/A N/A N/A Set active ``G0`` or ``G1`` charset.

        :param str code: character set code, should be a character
                         from ``"B0UK"`` -- otherwise ignored.
        :param str mode: if ``"("`` ``G0`` charset is set, if
                         ``")"`` -- we operate on ``G1``.

        .. warning:: User-defined charsets are currently not supported.
         N/A N/A code N/A cs MAPS N/A N/A N/A setattr self N/A N/A ( ) g0_charset g1_charset N/A mode N/A N/A cs MAPS N/A code N/A set_mode N/A N/A self N/A modes kwargs N/A N/A Sets (enables) a given list of modes.

        :param list modes: modes to set, where each mode is a constant
                           from :mod:`pyte.modes`.
         N/A N/A N/A kwargs get private N/A N/A modes N/A N/A mode 5 N/A mode modes N/A N/A N/A N/A self mode update modes N/A N/A N/A mo DECCOLM modes N/A N/A N/A N/A self resize columns 132 N/A N/A N/A self erase_in_display 2 N/A N/A N/A self cursor_position N/A N/A N/A mo DECOM modes N/A N/A N/A N/A self cursor_position N/A N/A N/A mo DECSCNM modes N/A N/A N/A N/A self buffer N/A N/A N/A N/A N/A char _replace reverse True N/A char line N/A line N/A self buffer N/A N/A N/A self select_graphic_rendition N/A N/A g _SGR N/A +reverse N/A N/A N/A mo DECTCEM modes N/A N/A N/A N/A self cursor hidden False N/A reset_mode N/A N/A self N/A modes kwargs N/A N/A Resets (disables) a given list of modes.

        :param list modes: modes to reset -- hopefully, each mode is a
                           constant from :mod:`pyte.modes`.
         N/A N/A N/A kwargs get private N/A N/A modes N/A N/A mode 5 N/A mode modes N/A N/A N/A N/A self mode difference_update modes N/A N/A N/A mo DECCOLM modes N/A N/A N/A N/A self resize columns 80 N/A N/A N/A self erase_in_display 2 N/A N/A N/A self cursor_position N/A N/A N/A mo DECOM modes N/A N/A N/A N/A self cursor_position N/A N/A N/A mo DECSCNM modes N/A N/A N/A N/A self buffer N/A N/A N/A N/A N/A char _replace reverse False N/A char line N/A line N/A self buffer N/A N/A N/A self select_graphic_rendition N/A N/A g _SGR N/A -reverse N/A N/A N/A mo DECTCEM modes N/A N/A N/A N/A self cursor hidden True N/A shift_in N/A N/A self N/A N/A N/A Activates ``G0`` character set. N/A N/A self charset 0 N/A shift_out N/A N/A self N/A N/A N/A Activates ``G1`` character set. N/A N/A self charset 1 N/A draw N/A N/A self char N/A N/A N/A Display a character at the current cursor position and advance
        the cursor if :data:`~pyte.modes.DECAWM` is set.

        :param str char: a character to display.
         N/A char N/A N/A char translate N/A N/A N/A self g0_charset N/A self g1_charset N/A N/A self charset N/A N/A N/A N/A self cursor x N/A self columns N/A N/A N/A N/A mo DECAWM N/A self mode N/A N/A N/A N/A self carriage_return N/A N/A N/A self linefeed N/A N/A N/A N/A self cursor x 1 N/A N/A N/A mo IRM N/A self mode N/A N/A N/A N/A self insert_characters 1 N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y N/A N/A N/A self cursor x N/A N/A N/A N/A self cursor attrs _replace data char N/A N/A N/A self cursor x 1 N/A carriage_return N/A N/A self N/A N/A N/A Move the cursor to the beginning of the current line. N/A N/A N/A self cursor x 0 N/A index N/A N/A self N/A N/A N/A Move the cursor down one line in the same column. If the
        cursor is at the last line, create a new line at the bottom.
         N/A N/A top bottom N/A self margins N/A N/A N/A N/A self cursor y bottom N/A N/A N/A N/A N/A self buffer pop top N/A N/A N/A N/A self buffer insert bottom N/A take N/A self columns N/A self default_line N/A N/A N/A N/A self cursor_down N/A reverse_index N/A N/A self N/A N/A N/A Move the cursor up one line in the same column. If the cursor
        is at the first line, create a new line at the top.
         N/A N/A top bottom N/A self margins N/A N/A N/A N/A self cursor y top N/A N/A N/A N/A N/A self buffer pop bottom N/A N/A N/A N/A self buffer insert top N/A take N/A self columns N/A self default_line N/A N/A N/A N/A self cursor_up N/A linefeed N/A N/A self N/A N/A N/A Performs an index and, if :data:`~pyte.modes.LNM` is set, a
        carriage return.
         N/A N/A N/A self index N/A N/A N/A mo LNM N/A self mode N/A N/A N/A N/A self carriage_return N/A N/A N/A self ensure_bounds N/A tab N/A N/A self N/A N/A N/A Move to the next tab space, or the end of the screen if there
        aren't anymore left.
         N/A stop N/A sorted N/A self tabstops N/A N/A N/A N/A N/A self cursor x stop N/A N/A column stop N/A N/A N/A column N/A N/A self columns 1 N/A N/A N/A self cursor x column N/A backspace N/A N/A self N/A N/A N/A Move cursor to the left one or keep it in it's position if
        it's at the beginning of the line already.
         N/A N/A N/A self cursor_back N/A save_cursor N/A N/A self N/A N/A N/A Push the current cursor position onto the stack. N/A N/A N/A N/A self savepoints append N/A Savepoint N/A N/A copy copy N/A self cursor N/A self g0_charset N/A self g1_charset N/A self charset N/A N/A mo DECOM N/A self mode N/A N/A mo DECAWM N/A self mode N/A restore_cursor N/A N/A self N/A N/A N/A Set the current cursor position to whatever cursor is on top
        of the stack.
         N/A N/A self savepoints N/A N/A savepoint N/A N/A N/A self savepoints pop N/A N/A self g0_charset N/A savepoint g0_charset N/A N/A self g1_charset N/A savepoint g1_charset N/A N/A self charset N/A savepoint charset N/A N/A savepoint origin N/A N/A N/A N/A self set_mode N/A mo DECOM N/A N/A savepoint wrap N/A N/A N/A N/A self set_mode N/A mo DECAWM N/A N/A self cursor N/A savepoint cursor N/A N/A N/A self ensure_bounds use_margins True N/A N/A N/A N/A self reset_mode N/A mo DECOM N/A N/A N/A self cursor_position N/A insert_lines N/A N/A self count N/A None N/A N/A Inserts the indicated # of lines at line with cursor. Lines
        displayed **at** and below the cursor move down. Lines moved
        past the bottom margin are lost.

        :param count: number of lines to delete.
         N/A count N/A count 1 N/A N/A top bottom N/A self margins N/A N/A top N/A N/A self cursor y bottom N/A N/A line N/A range N/A N/A self cursor y N/A min N/A bottom 1 N/A N/A N/A self cursor y count N/A N/A N/A N/A N/A self buffer pop bottom N/A N/A N/A N/A self buffer insert line N/A take N/A self columns N/A self default_line N/A N/A N/A self carriage_return N/A delete_lines N/A N/A self count N/A None N/A N/A Deletes the indicated # of lines, starting at line with
        cursor. As lines are deleted, lines displayed below cursor
        move up. Lines added to bottom of screen have spaces with same
        character attributes as last line moved up.

        :param int count: number of lines to delete.
         N/A count N/A count 1 N/A N/A top bottom N/A self margins N/A N/A top N/A N/A self cursor y bottom N/A N/A _ N/A range N/A min N/A N/A bottom N/A N/A self cursor y 1 count N/A N/A N/A N/A N/A self buffer pop N/A N/A self cursor y N/A N/A N/A N/A self buffer insert bottom N/A list N/A repeat N/A N/A self cursor attrs N/A self columns N/A N/A N/A self carriage_return N/A insert_characters N/A N/A self count N/A None N/A N/A Inserts the indicated # of blank characters at the cursor
        position. The cursor does not move and remains at the beginning
        of the inserted blank characters. Data on the line is shifted
        forward.

        :param int count: number of characters to insert.
         N/A count N/A count 1 N/A _ N/A range N/A min N/A N/A self columns N/A N/A self cursor y count N/A N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y insert N/A N/A self cursor x N/A N/A self cursor attrs N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y pop N/A delete_characters N/A N/A self count N/A None N/A N/A Deletes the indicated # of characters, starting with the
        character at cursor position. When a character is deleted, all
        characters to the right of cursor move left. Character attributes
        move with the characters.

        :param int count: number of characters to delete.
         N/A count N/A count 1 N/A _ N/A range N/A min N/A N/A self columns N/A N/A self cursor x count N/A N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y pop N/A N/A self cursor x N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y append N/A N/A self cursor attrs N/A erase_characters N/A N/A self count N/A None N/A N/A Erases the indicated # of characters, starting with the
        character at cursor position. Character attributes are set
        cursor attributes. The cursor remains in the same position.

        :param int count: number of characters to erase.

        .. warning::

           Even though *ALL* of the VTXXX manuals state that character
           attributes **should be reset to defaults**, ``libvte``,
           ``xterm`` and ``ROTE`` completely ignore this. Same applies
           too all ``erase_*()`` and ``delete_*()`` methods.
         N/A count N/A count 1 N/A column N/A range N/A N/A self cursor x N/A min N/A N/A N/A self cursor x count N/A self columns N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y N/A column N/A N/A self cursor attrs N/A erase_in_line N/A N/A self type_of private N/A 0 False N/A N/A Erases a line in a specific way.

        :param int type_of: defines the way the line should be erased in:

            * ``0`` -- Erases from cursor to end of line, including cursor
              position.
            * ``1`` -- Erases from beginning of line to cursor,
              including cursor position.
            * ``2`` -- Erases complete line.
        :param bool private: when ``True`` character attributes are left
                             unchanged **not implemented**.
         N/A interval N/A N/A N/A range N/A N/A self cursor x N/A self columns N/A range 0 N/A N/A N/A self cursor x 1 N/A range 0 N/A self columns N/A type_of N/A column interval N/A N/A N/A N/A N/A self buffer N/A N/A N/A self cursor y N/A column N/A N/A self cursor attrs N/A erase_in_display N/A N/A self type_of private N/A 0 False N/A N/A Erases display in a specific way.

        :param int type_of: defines the way the line should be erased in:

            * ``0`` -- Erases from cursor to end of screen, including
              cursor position.
            * ``1`` -- Erases from beginning of screen to cursor,
              including cursor position.
            * ``2`` -- Erases complete display. All lines are erased
              and changed to single-width. Cursor does not move.
        :param bool private: when ``True`` character attributes are left
                             unchanged **not implemented**.
         N/A interval N/A N/A N/A range N/A N/A N/A self cursor y 1 N/A self lines N/A range 0 N/A N/A self cursor y N/A range 0 N/A self lines N/A type_of N/A line interval N/A N/A N/A N/A N/A self buffer N/A line N/A N/A N/A N/A self cursor attrs N/A _ N/A range N/A self columns N/A N/A type_of N/A 0 1 N/A N/A N/A N/A self erase_in_line type_of N/A set_tab_stop N/A N/A self N/A N/A N/A Sest a horizontal tab stop at cursor position. N/A N/A N/A N/A self tabstops add N/A N/A self cursor x N/A clear_tab_stop N/A N/A self type_of N/A None N/A N/A Clears a horizontal tab stop in a specific way, depending
        on the ``type_of`` value:

        * ``0`` or nothing -- Clears a horizontal tab stop at cursor
          position.
        * ``3`` -- Clears all horizontal tab stops.
         N/A N/A type_of N/A N/A N/A N/A N/A self tabstops discard N/A N/A self cursor x N/A N/A N/A type_of 3 N/A N/A N/A self tabstops N/A set N/A ensure_bounds N/A N/A self use_margins N/A None N/A N/A Ensure that current cursor position is within screen bounds.

        :param bool use_margins: when ``True`` or when
                                 :data:`~pyte.modes.DECOM` is set,
                                 cursor is bounded by top and and bottom
                                 margins, instead of ``[0; lines - 1]``.
         N/A N/A use_margins N/A N/A mo DECOM N/A self mode N/A N/A N/A top bottom N/A self margins N/A N/A N/A top bottom N/A 0 N/A N/A self lines 1 N/A N/A N/A self cursor x N/A min N/A max 0 N/A N/A self cursor x N/A N/A self columns 1 N/A N/A N/A self cursor y N/A min N/A max top N/A N/A self cursor y bottom N/A cursor_up N/A N/A self count N/A None N/A N/A Moves cursor up the indicated # of lines in same column.
        Cursor stops at top margin.

        :param int count: number of lines to skip.
         N/A N/A N/A self cursor y N/A count 1 N/A N/A N/A self ensure_bounds use_margins True N/A cursor_up1 N/A N/A self count N/A None N/A N/A Moves cursor up the indicated # of lines to column 1. Cursor
        stops at bottom margin.

        :param int count: number of lines to skip.
         N/A N/A N/A self cursor_up count N/A N/A N/A self carriage_return N/A cursor_down N/A N/A self count N/A None N/A N/A Moves cursor down the indicated # of lines in same column.
        Cursor stops at bottom margin.

        :param int count: number of lines to skip.
         N/A N/A N/A self cursor y N/A count 1 N/A N/A N/A self ensure_bounds use_margins True N/A cursor_down1 N/A N/A self count N/A None N/A N/A Moves cursor down the indicated # of lines to column 1.
        Cursor stops at bottom margin.

        :param int count: number of lines to skip.
         N/A N/A N/A self cursor_down count N/A N/A N/A self carriage_return N/A cursor_back N/A N/A self count N/A None N/A N/A Moves cursor left the indicated # of columns. Cursor stops
        at left margin.

        :param int count: number of columns to skip.
         N/A N/A N/A self cursor x N/A count 1 N/A N/A N/A self ensure_bounds N/A cursor_forward N/A N/A self count N/A None N/A N/A Moves cursor right the indicated # of columns. Cursor stops
        at right margin.

        :param int count: number of columns to skip.
         N/A N/A N/A self cursor x N/A count 1 N/A N/A N/A self ensure_bounds N/A cursor_position N/A N/A self line column N/A None None N/A N/A Set the cursor to a specific `line` and `column`.

        Cursor is allowed to move out of the scrolling region only when
        :data:`~pyte.modes.DECOM` is reset, otherwise -- the position
        doesn't change.

        :param int line: line number to move the cursor to.
        :param int column: column number to move the cursor to.
         N/A column N/A N/A column 1 1 N/A line N/A N/A line 1 1 N/A N/A N/A mo DECOM N/A self mode N/A N/A line N/A N/A self margins top N/A N/A N/A N/A N/A self margins top line N/A N/A self margins bottom N/A N/A N/A N/A N/A N/A self cursor x N/A N/A self cursor y N/A column line N/A N/A N/A self ensure_bounds N/A cursor_to_column N/A N/A self column N/A None N/A N/A Moves cursor to a specific column in the current line.

        :param int column: column number to move the cursor to.
         N/A N/A N/A self cursor x N/A N/A column 1 1 N/A N/A N/A self ensure_bounds N/A cursor_to_line N/A N/A self line N/A None N/A N/A Moves cursor to a specific line in the current column.

        :param int line: line number to move the cursor to.
         N/A N/A N/A self cursor y N/A N/A line 1 1 N/A N/A N/A mo DECOM N/A self mode N/A N/A N/A N/A self cursor y N/A N/A self margins top N/A N/A N/A self ensure_bounds N/A bell N/A N/A self N/A args N/A N/A Bell stub -- the actual implementation should probably be
        provided by the end-user.
         N/A alignment_display N/A N/A self N/A N/A N/A Fills screen with uppercase E's for screen focus and alignment. N/A line N/A self buffer N/A N/A N/A column char N/A enumerate line N/A N/A N/A line N/A column N/A N/A char _replace data E N/A select_graphic_rendition N/A N/A self N/A attrs N/A N/A Set display attributes.

        :param list attrs: a list of display attributes to set.
         N/A replace N/A N/A attr N/A attrs N/A 0 N/A N/A N/A attr N/A g FG N/A N/A N/A replace N/A fg N/A N/A g FG N/A attr N/A N/A N/A attr N/A g BG N/A N/A N/A replace N/A bg N/A N/A g BG N/A attr N/A N/A N/A attr N/A g TEXT N/A N/A attr N/A N/A g TEXT N/A attr N/A N/A replace N/A N/A attr N/A 1 N/A N/A attr startswith + N/A N/A N/A attr N/A N/A replace N/A N/A N/A self default_char _asdict N/A N/A N/A self cursor attrs N/A N/A N/A N/A self cursor attrs _replace replace N/A N/A DiffScreen N/A Screen N/A N/A A screen subclass, which maintains a set of dirty lines in its
    :attr:`dirty` attribute. The end user is responsible for emptying
    a set, when a diff is applied.

    .. attribute:: dirty

       A set of line numbers, which should be re-drawn.

       >>> screen = DiffScreen(80, 24)
       >>> screen.dirty.clear()
       >>> screen.draw(u"!")
       >>> screen.dirty
       set([0])
     __init__ N/A N/A self N/A args N/A N/A N/A self dirty N/A set N/A N/A N/A N/A super DiffScreen self __init__ args N/A set_mode N/A N/A self N/A modes kwargs N/A N/A N/A N/A N/A N/A mo DECSCNM 5 modes N/A N/A kwargs get private N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self set_mode modes kwargs N/A reset_mode N/A N/A self N/A modes kwargs N/A N/A N/A N/A N/A N/A mo DECSCNM 5 modes N/A N/A kwargs get private N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self reset_mode modes kwargs N/A reset N/A N/A self N/A N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self reset N/A resize N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self resize args kwargs N/A draw N/A N/A self N/A args N/A N/A N/A N/A N/A super DiffScreen self draw args N/A N/A N/A N/A self dirty add N/A N/A self cursor y N/A index N/A N/A self N/A N/A N/A N/A N/A N/A self cursor y N/A N/A self margins bottom N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self index N/A reverse_index N/A N/A self N/A N/A N/A N/A N/A N/A self cursor y N/A N/A self margins top N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self reverse_index N/A insert_lines N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty update N/A range N/A N/A self cursor y N/A self lines N/A N/A N/A N/A super DiffScreen self insert_lines args N/A delete_lines N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty update N/A range N/A N/A self cursor y N/A self lines N/A N/A N/A N/A super DiffScreen self delete_lines args N/A insert_characters N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty add N/A N/A self cursor y N/A N/A N/A N/A super DiffScreen self insert_characters args N/A delete_characters N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty add N/A N/A self cursor y N/A N/A N/A N/A super DiffScreen self delete_characters args N/A erase_characters N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty add N/A N/A self cursor y N/A N/A N/A N/A super DiffScreen self erase_characters args N/A erase_in_line N/A N/A self N/A args N/A N/A N/A N/A N/A self dirty add N/A N/A self cursor y N/A N/A N/A N/A super DiffScreen self erase_in_line args N/A erase_in_display N/A N/A self type_of N/A 0 N/A N/A N/A N/A N/A self dirty update N/A N/A N/A range N/A N/A N/A self cursor y 1 N/A self lines N/A range 0 N/A N/A self cursor y N/A range 0 N/A self lines N/A type_of N/A N/A N/A N/A super DiffScreen self erase_in_display type_of N/A alignment_display N/A N/A self N/A N/A N/A N/A N/A N/A self dirty update N/A range N/A self lines N/A N/A N/A N/A super DiffScreen self alignment_display N/A N/A N/A History N/A namedtuple History top bottom ratio size position HistoryScreen N/A DiffScreen N/A N/A A screen subclass, which keeps track of screen history and allows
    pagination. This is not linux-specific, but still useful; see  page
    462 of VT520 User's Manual.

    :param int history: total number of history lines to keep; is split
                        between top and bottom queues.
    :param int ratio: defines how much lines to scroll on :meth:`next_page`
                      and :meth:`prev_page` calls.

    .. attribute:: history

       A pair of history queues for top and bottom margins accordingly;
       here's the overall screen structure::

            [ 1: .......]
            [ 2: .......]  <- top history
            [ 3: .......]
            ------------
            [ 4: .......]  s
            [ 5: .......]  c
            [ 6: .......]  r
            [ 7: .......]  e
            [ 8: .......]  e
            [ 9: .......]  n
            ------------
            [10: .......]
            [11: .......]  <- bottom history
            [12: .......]

    .. note::

       Don't forget to update :class:`~pyte.streams.Stream` class with
       appropriate escape sequences -- you can use any, since pagination
       protocol is not standardized, for example::

           Stream.escape["N"] = "next_page"
           Stream.escape["P"] = "prev_page"
     __init__ N/A N/A self columns lines history ratio N/A 100 0.5 N/A N/A N/A self history N/A History N/A deque maxlen N/A history 2 N/A deque maxlen history N/A float ratio history history N/A N/A N/A N/A super HistoryScreen self __init__ columns lines N/A __before__ N/A N/A self command N/A N/A N/A Ensures a screen is at the bottom of the history buffer. N/A N/A command N/A prev_page next_page N/A N/A N/A N/A N/A self history position N/A N/A self history size N/A N/A N/A N/A self next_page N/A N/A N/A N/A super HistoryScreen self __before__ command N/A __after__ N/A N/A self command N/A N/A N/A Ensures all lines on a screen have proper width (:attr:`columns`).

        Extra characters are truncated, missing characters are filled
        with whitespace.
         N/A N/A command N/A prev_page next_page N/A N/A N/A idx line N/A enumerate N/A self buffer N/A N/A N/A N/A len line N/A self columns N/A N/A N/A N/A self buffer N/A idx N/A line N/A N/A self columns N/A N/A N/A N/A len line N/A self columns N/A N/A N/A N/A self buffer N/A idx N/A line N/A take N/A N/A self columns N/A len line N/A self default_line N/A N/A N/A self cursor hidden N/A N/A N/A N/A abs N/A N/A N/A self history position N/A N/A self history size N/A self lines N/A N/A mo DECTCEM N/A self mode N/A N/A N/A N/A super HistoryScreen self __after__ command N/A reset N/A N/A self N/A N/A N/A Overloaded to reset screen history state: history position
        is reset to bottom of both queues;  queues themselves are
        emptied.
         N/A N/A N/A N/A super HistoryScreen self reset N/A N/A N/A N/A N/A self history top clear N/A N/A N/A N/A N/A self history bottom clear N/A N/A self history N/A N/A N/A self history _replace position N/A N/A self history size N/A index N/A N/A self N/A N/A N/A Overloaded to update top history with the removed lines. N/A N/A top bottom N/A self margins N/A N/A N/A N/A self cursor y bottom N/A N/A N/A N/A N/A N/A self history top append N/A N/A self buffer N/A top N/A N/A N/A N/A super HistoryScreen self index N/A reverse_index N/A N/A self N/A N/A N/A Overloaded to update bottom history with the removed lines. N/A N/A top bottom N/A self margins N/A N/A N/A N/A self cursor y top N/A N/A N/A N/A N/A N/A self history bottom append N/A N/A self buffer N/A bottom N/A N/A N/A N/A super HistoryScreen self reverse_index N/A prev_page N/A N/A self N/A N/A N/A Moves the screen page up through the history buffer. Page
        size is defined by ``history.ratio``, so for instance
        ``ratio = .5`` means that half the screen is restored from
        history on page switch.
         N/A N/A N/A N/A N/A self history position N/A self lines N/A N/A self history top N/A N/A mid N/A min N/A len N/A N/A self history top N/A int N/A N/A math ceil N/A N/A self lines N/A N/A self history ratio N/A N/A N/A N/A N/A self history bottom extendleft N/A reversed N/A N/A self buffer N/A N/A mid N/A N/A self history N/A N/A N/A self history _replace position N/A N/A N/A self history position N/A self lines N/A N/A N/A self buffer N/A N/A N/A list N/A reversed N/A N/A N/A N/A N/A self history top pop N/A _ N/A range mid N/A N/A self buffer N/A N/A mid N/A N/A self dirty N/A set N/A range N/A self lines N/A next_page N/A N/A self N/A N/A N/A Moves the screen page down through the history buffer. N/A N/A N/A N/A N/A self history position N/A N/A self history size N/A N/A self history bottom N/A N/A mid N/A min N/A len N/A N/A self history bottom N/A int N/A N/A math ceil N/A N/A self lines N/A N/A self history ratio N/A N/A N/A N/A N/A self history top extend N/A N/A self buffer N/A mid N/A N/A self history N/A N/A N/A self history _replace position N/A N/A N/A self history position N/A self lines N/A N/A N/A self buffer N/A N/A N/A N/A self buffer N/A mid N/A N/A N/A N/A N/A self history bottom popleft N/A _ N/A range mid N/A N/A self dirty N/A set N/A range N/A self lines N/A N/A