/usr/lib64/python2.6/Demo/curses
NameSizeModeActions
life.py73530755editdlrm
life.pyc68630644editdlrm
life.pyo68630644editdlrm
ncurses.py66820644editdlrm
ncurses.pyc58670644editdlrm
ncurses.pyo58670644editdlrm
rain.py24340644editdlrm
rain.pyc23160644editdlrm
rain.pyo23160644editdlrm
README8520644editdlrm
repeat.py15190755editdlrm
repeat.pyc14650644editdlrm
repeat.pyo14650644editdlrm
tclock.py33640644editdlrm
tclock.pyc36890644editdlrm
tclock.pyo36890644editdlrm
xmas.py254990644editdlrm
xmas.pyc199290644editdlrm
xmas.pyo199290644editdlrm
Edit: /usr/lib64/python2.6/Demo/curses/life.pyo (6863B)
Ñò «gc@s‰ddkZddkZddkZddkZdd d„ƒYZd„Zd„Zd„Zd„Ze djoei eƒndS( iÿÿÿÿNt LifeBoardcBsPeZdZedƒd„Zd„Zd„Zd„Zed„Z d„Z RS(sEncapsulates a Life board Attributes: X,Y : horizontal and vertical size of the board state : dictionary mapping (x,y) to 0 or 1 Methods: display(update_board) -- If update_board is true, compute the next generation. Then display the state of the board and refresh the screen. erase() -- clear the entire board makeRandom() -- fill the board randomly set(y,x) -- set the given cell to Live; doesn't refresh the screen toggle(y,x) -- change the given cell from live to dead, or vice versa, and refresh the screen display t*cCs h|_||_|iiƒ\}}|d|dd|_|_||_|iiƒd|idd}|iidd|ƒ|ii|idd|ƒxUtd|iƒD]A}|iid|ddƒ|iid||iddƒq·W|ii ƒdS(s¤Create a new LifeBoard instance. scr -- curses screen object to use for display char -- character used to render live cells (default: '*') iit+t-it|N( tstatetscrtgetmaxyxtXtYtchartcleartaddstrtrangetrefresh(tselfRR R Rt border_linety((s(/usr/lib64/python2.6/Demo/curses/life.pyt__init__)s    %cCsh|djp-|i|jp|djp|i|jotd||f‚nd|i||f} x5|D]-} |ii| | fƒo|d7}ququWqhW|| 8}|djoId|||f<|ii|d|d|iƒ| p d|_ qdq|djo| od|||ftboardtxpostypostc((s(/usr/lib64/python2.6/Demo/curses/life.pytkeyloop”sd                    $$cCst|ƒdS(N(RM(R4((s(/usr/lib64/python2.6/Demo/curses/life.pytmainÓst__main__(( R+tstringt tracebackRBRR6R7RMRNR-twrapper(((s(/usr/lib64/python2.6/Demo/curses/life.pyts$ n   ?