capybara/virtualenv/lib/python2.7/site-packages/pip/wheel.py
def fix_script(path):
    """Replace #!python with #!/path/to/python
    Return True if file was changed."""
    # XXX RECORD hashes will need to be updated
    if os.path.isfile(path):
        with open(path, 'rb') as script:
            firstline = script.readline()
            if not firstline.startswith(b'#!python'):
                return False
            exename = sys.executable.encode(sys.getfilesystemencoding())
            firstline = b'#!' + exename + os.linesep.encode("ascii")
            rest = script.read()
        with open(path, 'wb') as script:
            script.write(firstline)
            script.write(rest)
        return True
def fix_script(path):
    """Replace #!python with #!/path/to/python
    Return True if file was changed."""
    # XXX RECORD hashes will need to be updated
    if os.path.isfile(path):
        with open(path, 'rb') as script:
            firstline = script.readline()
            if not firstline.startswith(b'#!python'):
                return False
            exename = sys.executable.encode(sys.getfilesystemencoding())
            firstline = b'#!' + exename + os.linesep.encode("ascii")
            rest = script.read()
        with open(path, 'wb') as script:
            script.write(firstline)
            script.write(rest)
        return True
def fix_script ( path ) : # XXX RECORD hashes will need to be updated if os . path . isfile ( path ) : with open ( path , 'rb' ) as script : firstline = script . readline ( ) if not firstline . startswith ( b'#!python' ) : return False exename = sys . executable . encode ( sys . getfilesystemencoding ( ) ) firstline = b'#!' + exename + os . linesep . encode ( "ascii" ) rest = script . read ( ) with open ( path , 'wb' ) as script : script . write ( firstline ) script . write ( rest ) return True
Replace #!python with #!/path/to/python
    Return True if file was changed.
Replace #!python with #! / path / to / python Return True if file was changed .