def create_bootstrap_script(extra_text, python_version=''):
 filename = __file__
 if filename.endswith('.pyc'):
  filename = filename[:(-1)]
 with codecs.open(filename, 'r', encoding='utf-8') as f:
  content = f.read()
 py_exe = ('python%s' % python_version)
 content = ((('#!/usr/bin/env %s\n' % py_exe) + '## WARNING: This file is generated\n') + content)
 return content.replace('##EXTEND##', extra_text)

def create_bootstrap_script ( extra_text , python_version = '' ) : filename = __file__ if filename . endswith ( '.pyc' ) : filename = filename [ : ( - 1 ) ] with codecs . open ( filename , 'r' , encoding = 'utf-8' ) as f : content = f . read ( ) py_exe = ( 'python%s' % python_version ) content = ( ( ( '#!/usr/bin/env %s\n' % py_exe ) + '## WARNING: This file is generated\n' ) + content ) return content . replace ( '##EXTEND##' , extra_text )
creates a bootstrap script .