@@ -0,0 +1,1248 @@
+'''Module that when called from the command line will go through all%0Afiles in the Scripts directory of the current python and will change the%0Apython path hardcoded in these files from a full python path, to just%0Apython.exe.%0A'''%0A%0Aimport sys%0Aimport os%0Afrom os import listdir, remove, rename%0Afrom os.path import dirname, join%0Afrom re import compile, sub%0Afrom tempfile import mkstemp%0Afrom shutil import copystat%0A%0Apypat = compile('#!(.+?)python.exe')%0A%0A%0Adef make_portable():%0A    scripts = join(dirname(sys.executable), 'Scripts')%0A    for fname in listdir(scripts):%0A        f = join(scripts, fname)%0A        with open(f, 'rb') as fh:%0A            old = fh.read()%0A        new = sub(pypat, '#!python.exe', old)%0A        if old == new:%0A            continue%0A%0A        fd, tmp = mkstemp(prefix=fname, dir=scripts)%0A        os.close(fd)%0A        try:%0A            with open(tmp, 'wb') as fh:%0A                fh.write(new)%0A        except:%0A            print(%22Couldn't write %7B%7D%22.format(tmp))%0A            continue%0A%0A        copystat(f, tmp)%0A        try:%0A            remove(f)%0A        except:%0A            print(%22Couldn't remove %7B%7D%22.format(f))%0A            continue%0A        rename(tmp, f)%0A        print('Updated %7B%7D'.format(f))%0A%0A%0Aif __name__ == '__main__':%0A    make_portable()%0A

Add make python portable script.