'Restart program by raising an exception to be caught in the main
debugger loop.  If arguments were given, set them in sys.argv.'

def do_run(self, arg):

    if arg:
        import shlex
        argv0 = sys.argv[0:1]
        sys.argv = shlex.split(arg)
        sys.argv[:0] = argv0
    raise Restart
