Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore BinOpAdd BinOpMult Str Num Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Num Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad decorator_list FunctionDef arguments args NameParam TupleStore NameStore NameStore NameParam defaults body Expr Str Assign NameStore ListLoad Assert CompareEq Call AttributeLoad NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr orelse Assign NameStore NameStore NameLoad Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num Assign NameStore Num For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index SubscriptLoad Dict Num Num Num Num Num Num Num Num Index AttributeLoad NameLoad attr If BoolOpAnd CompareEq NameLoad NameLoad CompareLtE NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Call NameLoad NameLoad If CompareGt BinOpAdd NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad BinOpSub NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise NameLoad Str Return Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad If NameLoad body Return TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num ListLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list decorator_list Assign NameStore Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign NameStore BinOpAdd BinOpMult Str AttributeLoad NameLoad attr BinOpMult Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot NameLoad body Return Str Return BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad decorator_list If CompareGtE NameLoad Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Return BinOpAdd BinOpAdd Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Slice NameLoad Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Slice NameLoad orelse Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body For TupleStore NameStore NameStore NameLoad body Assert CompareEq Call NameLoad NameLoad NameLoad Assert BoolOpAnd CompareGt NameLoad Num CompareGt NameLoad Num handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise NameLoad Str TryExcept body For NameStore NameLoad body Assert CompareEq Call NameLoad NameLoad NameLoad For NameStore NameLoad body Assert CompareEq Call NameLoad NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise NameLoad Str Import alias Assign AttributeStore NameLoad attr NameLoad Import alias Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list
N/A N/A 
HTML PRE-based UI implementation
 urwid util urwid.main_loop ExitMainLoop urwid.display_common AttrSpec BaseScreen N/A _trans_table N/A N/A ? 32 N/A N/A join N/A N/A chr x N/A x N/A range 32 256 N/A _default_foreground black N/A _default_background light gray HtmlGeneratorSimulationError N/A Exception N/A N/A N/A HtmlGenerator N/A BaseScreen N/A N/A fragments N/A N/A sizes N/A N/A keys N/A N/A started True __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super HtmlGenerator self __init__ N/A N/A self colors 16 N/A N/A self bright_is_bold False N/A N/A self has_underline True N/A N/A N/A self register_palette_entry None _default_foreground _default_background N/A set_terminal_properties N/A N/A self colors bright_is_bold has_underline N/A None None None N/A N/A N/A colors None N/A N/A colors N/A self colors N/A N/A bright_is_bold None N/A N/A bright_is_bold N/A self bright_is_bold N/A N/A has_underline None N/A N/A has_underline N/A self has_underline N/A N/A self colors colors N/A N/A self bright_is_bold bright_is_bold N/A N/A self has_underline has_underline N/A set_mouse_tracking N/A N/A self enable N/A True N/A N/A Not yet implemented N/A N/A start N/A N/A self N/A N/A N/A N/A stop N/A N/A self N/A N/A N/A N/A set_input_timeouts N/A N/A self N/A args N/A N/A N/A reset_default_terminal_palette N/A N/A self N/A args N/A N/A N/A run_wrapper N/A N/A self fn N/A N/A N/A Call fn. N/A N/A fn N/A draw_screen N/A N/A self N/A cols rows r N/A N/A N/A Create an html fragment from the render object. 
        Append it to HtmlGenerator.fragments list.
         N/A l N/A N/A N/A N/A N/A r rows rows N/A N/A N/A r cursor None N/A N/A N/A cx cy N/A r cursor N/A N/A cx cy None N/A y -1 N/A row N/A N/A r content N/A N/A y 1 N/A col 0 N/A N/A a cs run row N/A N/A run N/A N/A run translate _trans_table N/A N/A isinstance a AttrSpec N/A N/A aspec a N/A N/A aspec N/A N/A N/A self _palette N/A a N/A N/A N/A 1 16 88 256 1 0 2 3 N/A N/A self colors N/A N/A N/A y cy N/A col cx N/A N/A run_width N/A N/A util calc_width run 0 N/A len run N/A N/A N/A col run_width cx N/A N/A N/A N/A l append N/A html_span run aspec N/A cx col N/A N/A N/A N/A l append N/A html_span run aspec N/A col run_width N/A N/A N/A N/A l append N/A html_span run aspec N/A N/A N/A l append N/A N/A N/A N/A self fragments append N/A <pre>%s</pre> N/A N/A join l N/A clear N/A N/A self N/A N/A N/A 
        Force the screen to be completely repainted on the next
        call to draw_screen().

        (does nothing for html_fragment)
         N/A N/A get_cols_rows N/A N/A self N/A N/A N/A Return the next screen size in HtmlGenerator.sizes. N/A N/A N/A self sizes N/A N/A HtmlGeneratorSimulationError Ran out of screen sizes to return! N/A N/A N/A N/A self sizes pop 0 N/A get_input N/A N/A self raw_keys N/A False N/A N/A Return the next list of keypresses in HtmlGenerator.keys. N/A N/A N/A self keys N/A N/A N/A ExitMainLoop N/A raw_keys N/A N/A N/A N/A N/A N/A self keys pop 0 N/A N/A N/A N/A N/A self keys pop 0 N/A N/A N/A _default_aspec N/A AttrSpec _default_foreground _default_background N/A N/A _d_fg_r _d_fg_g _d_fg_b _d_bg_r _d_bg_g _d_bg_b N/A N/A _default_aspec get_rgb_values html_span N/A N/A s aspec cursor N/A -1 N/A N/A N/A fg_r fg_g fg_b bg_r bg_g bg_b N/A N/A aspec get_rgb_values N/A N/A fg_r None N/A N/A N/A fg_r fg_g fg_b N/A _d_fg_r _d_fg_g _d_fg_b N/A N/A bg_r None N/A N/A N/A bg_r bg_g bg_b N/A _d_bg_r _d_bg_g _d_bg_b N/A html_fg N/A #%02x%02x%02x N/A fg_r fg_g fg_b N/A html_bg N/A #%02x%02x%02x N/A bg_r bg_g bg_b N/A N/A aspec standout N/A N/A N/A html_fg html_bg N/A html_bg html_fg N/A extra N/A N/A ;text-decoration:underline N/A aspec underline N/A ;font-weight:bold N/A aspec bold html_span N/A N/A fg bg s N/A N/A N/A N/A s N/A N/A N/A N/A <span style="color:%s;background:%s%s">%s</span> N/A fg bg extra N/A html_escape s N/A N/A N/A cursor 0 N/A N/A N/A c_off _ign N/A N/A util calc_text_pos s 0 N/A len s cursor N/A c2_off N/A N/A util move_next_char s c_off N/A len s N/A N/A N/A N/A html_span html_fg html_bg N/A s N/A c_off N/A html_span html_bg html_fg N/A s N/A c_off c2_off N/A html_span html_fg html_bg N/A s N/A c2_off N/A N/A N/A html_span html_fg html_bg s N/A html_escape N/A N/A text N/A N/A N/A Escape text so that it will be displayed safely within HTML N/A text N/A N/A text replace & &amp; N/A text N/A N/A text replace < &lt; N/A text N/A N/A text replace > &gt; N/A text N/A screenshot_init N/A N/A sizes keys N/A N/A N/A 
    Replace curses_display.Screen and raw_display.Screen class with 
    HtmlGenerator.
    
    Call this function before executing an application that uses 
    curses_display.Screen to have that code use HtmlGenerator instead.
    
    sizes -- list of ( columns, rows ) tuples to be returned by each call
             to HtmlGenerator.get_cols_rows()
    keys -- list of lists of keys to be returned by each call to
            HtmlGenerator.get_input()
    
    Lists of keys may include "window resize" to force the application to
    call get_cols_rows and read a new screen size.

    For example, the following call will prepare an application to:
     1. start in 80x25 with its first call to get_cols_rows()
     2. take a screenshot when it calls draw_screen(..)
     3. simulate 5 "down" keys from get_input()
     4. take a screenshot when it calls draw_screen(..)
     5. simulate keys "a", "b", "c" and a "window resize"
     6. resize to 20x10 on its second call to get_cols_rows()
     7. take a screenshot when it calls draw_screen(..)
     8. simulate a "Q" keypress to quit the application

    screenshot_init( [ (80,25), (20,10) ],
        [ ["down"]*5, ["a","b","c","window resize"], ["Q"] ] )
     N/A N/A N/A N/A row col sizes N/A N/A N/A N/A type row int N/A N/A N/A row 0 N/A col 0 N/A N/A N/A N/A AssertionError ValueError N/A N/A Exception sizes must be in the form [ (col1,row1), (col2,row2), ...] N/A N/A N/A l keys N/A N/A N/A N/A type l list N/A k l N/A N/A N/A N/A type k str N/A N/A N/A N/A AssertionError ValueError N/A N/A Exception keys must be in the form [ [keyA1, keyA2, ..], [keyB1, ..], ...] N/A curses_display N/A N/A curses_display Screen HtmlGenerator N/A raw_display N/A N/A raw_display Screen HtmlGenerator N/A N/A HtmlGenerator sizes sizes N/A N/A HtmlGenerator keys keys N/A screenshot_collect N/A N/A N/A N/A N/A Return screenshots as a list of HTML fragments. N/A l N/A HtmlGenerator fragments N/A N/A HtmlGenerator fragments N/A N/A l N/A