<s> import os , string , marshal <EOL> delpyo = <NUM_LIT:0> <EOL> def timestamp ( name ) : <EOL> try : <EOL> s = os . stat ( name ) <EOL> except OSError : <EOL> return None <EOL> return long ( s [ <NUM_LIT:8> ] ) <EOL> def comp ( name ) : <EOL> try : <EOL> dirs = os . listdir ( name ) <EOL> for item in dirs : <EOL> fullname = os . path . join ( name , item ) <EOL> comp ( fullname ) <EOL> except OSError : <EOL> ext = name [ - <NUM_LIT:3> : ] <EOL> if delpyo == <NUM_LIT:1> : <EOL> if ext == '<STR_LIT>' : <EOL> print "<STR_LIT>" , name <EOL> os . remove ( name ) <EOL> return <EOL> if ( ext != "<STR_LIT>" ) : <EOL> return <EOL> outname = name [ : - <NUM_LIT:3> ] + "<STR_LIT>" <EOL> intime = timestamp ( name ) <EOL> outtime = timestamp ( outname ) <EOL> if outtime is not None and outtime >= intime : <EOL> return <EOL> base = os . path . basename ( name ) <EOL> print "<STR_LIT>" , name , "<STR_LIT:to>" , outname <EOL> f = open ( name , "<STR_LIT:r>" ) <EOL> source = string . replace ( f . read ( ) , "<STR_LIT:\r\n>" , "<STR_LIT:\n>" ) + '<STR_LIT:\n>' <EOL> try : <EOL> code = compile ( source , base , "<STR_LIT>" ) <EOL> of = open ( outname , "<STR_LIT:wb>" ) <EOL> marshal . dump ( code , of ) <EOL> except SyntaxError , se : <EOL> er = "<STR_LIT>" + str ( se . lineno ) + "<STR_LIT::>" <EOL> print er + se . text , <EOL> offset = se . offset + len ( er ) - <NUM_LIT:1> <EOL> print "<STR_LIT:U+0020>" * offset + "<STR_LIT>" <EOL> import sys <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> if sys . argv [ <NUM_LIT:1> ] == '<STR_LIT>' : delpyo = <NUM_LIT:1> <EOL> comp ( "<STR_LIT>" ) <EOL> raw_input ( "<STR_LIT>" ) </s>
