#NEWLINE# def get_script_header( executable = SYS_EXECUTABLE , wininst = False ) : #NEWLINE# #INDENT# from distutils.command.build_scripts import first_line_re #NEWLINE# match = first_line_re . match ( six . b ( '' ) ) #NEWLINE# options = '' #NEWLINE# if wininst : #NEWLINE# #INDENT# options = ( match . group ( 1 ) or '' ) #NEWLINE# if options : #NEWLINE# #INDENT# options = ( ' ' + options ) #NEWLINE# #UNINDENT# #UNINDENT# if wininst : #NEWLINE# #INDENT# executable = 'python.exe' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# executable = nt_quote_arg ( executable ) #NEWLINE# #UNINDENT# hdr = ( '#!%(executable)s%(options)s\n' % locals ( ) ) #NEWLINE# if ( six . u ( hdr ) . encode ( 'ascii' ) != hdr ) : #NEWLINE# #INDENT# if options : #NEWLINE# #INDENT# if options . strip ( ) . startswith ( '-' ) : #NEWLINE# #INDENT# options = ( ' -x' + options . strip ( ) [ 1 : ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# options = ' -x' #NEWLINE# #UNINDENT# #UNINDENT# hdr = ( '#!%(executable)s%(options)s\n' % locals ( ) ) #NEWLINE# return hdr