<s> from flower import tasklet , run <EOL> from flower . net import Listen <EOL> def handle_connection ( conn ) : <EOL> while True : <EOL> data = conn . read ( ) <EOL> if not data : <EOL> break <EOL> conn . write ( data ) <EOL> l = Listen ( ( '<STR_LIT:127.0.0.1>' , <NUM_LIT> ) , "<STR_LIT>" ) <EOL> try : <EOL> while True : <EOL> try : <EOL> conn , err = l . accept ( ) <EOL> t = tasklet ( handle_connection ) ( conn ) <EOL> except KeyboardInterrupt : <EOL> break <EOL> finally : <EOL> l . close ( ) <EOL> run ( ) </s>
