<s> """<STR_LIT>""" <EOL> import os , sys <EOL> path = os . path . join ( '<STR_LIT:.>' , os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> sys . path . append ( path ) <EOL> from flask import Flask , g , render_template <EOL> import flask_sijax <EOL> app = Flask ( __name__ ) <EOL> app . config [ "<STR_LIT>" ] = os . path . join ( '<STR_LIT:.>' , os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> app . config [ "<STR_LIT>" ] = '<STR_LIT>' <EOL> flask_sijax . Sijax ( app ) <EOL> def comet_do_work_handler ( obj_response , sleep_time ) : <EOL> import time <EOL> for i in range ( <NUM_LIT:6> ) : <EOL> width = '<STR_LIT>' % ( i * <NUM_LIT> ) <EOL> obj_response . css ( '<STR_LIT>' , '<STR_LIT:width>' , width ) <EOL> obj_response . html ( '<STR_LIT>' , width ) <EOL> yield obj_response <EOL> if i != <NUM_LIT:5> : <EOL> time . sleep ( sleep_time ) <EOL> @ flask_sijax . route ( app , "<STR_LIT:/>" ) <EOL> def index ( ) : <EOL> if g . sijax . is_sijax_request : <EOL> g . sijax . register_comet_callback ( '<STR_LIT>' , comet_do_work_handler ) <EOL> return g . sijax . process_request ( ) <EOL> return render_template ( '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> app . run ( debug = True , port = <NUM_LIT> ) </s>
