def WriteReconfigScript(reconfig, slepcdir, usedargs):
    """ Write the contents of the reconfigure script """
    reconfig.write('#!/usr/bin/env python\n\n')
    reconfig.write('import os, sys\n')
    if usedargs:
        reconfig.write("sys.argv.extend('" + usedargs + "'.split())\n")
    reconfig.write("execfile(os.path.join('" + slepcdir +
        "','config','configure.py'))\n")
