<s> import sys , os , time <EOL> from stat import * <EOL> def main ( ) : <EOL> try : <EOL> statfunc = os . lstat <EOL> except AttributeError : <EOL> statfunc = os . stat <EOL> if sys . argv [ <NUM_LIT:1> ] == '<STR_LIT>' : <EOL> itime = ST_MTIME <EOL> del sys . argv [ <NUM_LIT:1> ] <EOL> elif sys . argv [ <NUM_LIT:1> ] == '<STR_LIT:-c>' : <EOL> itime = ST_CTIME <EOL> del sys . argv [ <NUM_LIT:1> ] <EOL> elif sys . argv [ <NUM_LIT:1> ] == '<STR_LIT>' : <EOL> itime = ST_CTIME <EOL> del sys . argv [ <NUM_LIT:1> ] <EOL> else : <EOL> itime = ST_MTIME <EOL> secs_per_year = <NUM_LIT> * <NUM_LIT> * <NUM_LIT> <EOL> now = time . time ( ) <EOL> status = <NUM_LIT:0> <EOL> maxlen = <NUM_LIT:1> <EOL> for filename in sys . argv [ <NUM_LIT:1> : ] : <EOL> maxlen = max ( maxlen , len ( filename ) ) <EOL> for filename in sys . argv [ <NUM_LIT:1> : ] : <EOL> try : <EOL> st = statfunc ( filename ) <EOL> except os . error , msg : <EOL> sys . stderr . write ( "<STR_LIT>" % ( filename , msg ) ) <EOL> status = <NUM_LIT:1> <EOL> st = ( ) <EOL> if st : <EOL> anytime = st [ itime ] <EOL> size = st [ ST_SIZE ] <EOL> age = now - anytime <EOL> byteyears = float ( size ) * float ( age ) / secs_per_year <EOL> print filename . ljust ( maxlen ) , <EOL> print repr ( int ( byteyears ) ) . rjust ( <NUM_LIT:8> ) <EOL> sys . exit ( status ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
