<s> from shutil import copyfileobj <EOL> from functools import partial <EOL> from contextlib import closing <EOL> import pkg_resources <EOL> PACKAGE_NAME = "<STR_LIT>" <EOL> open_data = partial ( pkg_resources . resource_stream , PACKAGE_NAME ) <EOL> def copy_default ( filename , to_filename = None ) : <EOL> if to_filename is None : <EOL> to_filename = filename <EOL> with closing ( open_data ( "<STR_LIT>" % filename ) ) as default : <EOL> with open ( to_filename , "<STR_LIT:w>" ) as destination : <EOL> copyfileobj ( default , destination ) </s>
