V Qc@sJdZddlZddlZddlZddlZdZedS(srepeat This simple program repeatedly (at 1-second intervals) executes the shell command given on the command line and displays the output (or as much of it as fits on the screen). It uses curses to paint each new output on top of the old output, so that if nothing changes, the screen doesn't change. This is handy to watch for changes in e.g. a directory or process listing. To end, hit Control-C. iNcCsVtjds"tGHtjdndjtjd}tj|d}|j}|j}|rtj dI|IJtj|nt j }zxt rB|j y|j|Wnt jk rnX|jtjdtj|d}|j}|j}|rtj dI|IJtj|qqWWdt jXdS(Niit trs Exit code:(tsystargvt__doc__texittjointostpopentreadtclosetstderrtcursestinitscrtTrueterasetaddstrterrortrefreshttimetsleeptendwin(tcmdtpttexttststw((s*/usr/lib64/python2.7/Demo/curses/repeat.pytmains6          (RRRRR R(((s*/usr/lib64/python2.7/Demo/curses/repeat.pyt s