<s> import sys <EOL> import os <EOL> LICENSE = """<STR_LIT>""" <EOL> root = os . path . split ( os . path . abspath ( sys . argv [ <NUM_LIT:0> ] ) ) [ <NUM_LIT:0> ] <EOL> lib = root + os . path . sep + '<STR_LIT>' <EOL> EXTS = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> EXCLUDE = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> for path , dirs , files in os . walk ( lib ) : <EOL> for file in files : <EOL> file_path = os . path . join ( path , file ) <EOL> exclude = False <EOL> for exl in EXCLUDE : <EOL> if exl in file_path : exclude = True <EOL> if exclude : continue <EOL> ext = os . path . splitext ( file_path ) [ <NUM_LIT:1> ] <EOL> if not ext in EXTS : continue <EOL> f = open ( file_path ) <EOL> s = f . read ( ) <EOL> f . close ( ) <EOL> s = LICENSE + s <EOL> f = open ( file_path , '<STR_LIT:w>' ) <EOL> f . write ( s ) <EOL> f . close ( ) <EOL> print file_path </s>
