<s> import sys , os <EOL> from smisk . core import * <EOL> class MyApp ( Application ) : <EOL> def service ( self ) : <EOL> if self . request . url . path [ - <NUM_LIT:4> : ] == '<STR_LIT>' : <EOL> path = os . path . abspath ( self . request . url . path . replace ( '<STR_LIT:..>' , '<STR_LIT>' ) . lstrip ( '<STR_LIT:/>' ) ) <EOL> sys . stderr . write ( "<STR_LIT>" % path ) <EOL> self . response . send_file ( path ) <EOL> else : <EOL> self . response . headers = [ "<STR_LIT>" ] <EOL> self . response . write ( "<STR_LIT>" ) <EOL> self . response . write ( '<STR_LIT>' ) <EOL> try : <EOL> MyApp ( ) . run ( ) <EOL> except KeyboardInterrupt : <EOL> pass </s>
