Joe wrote: > I want the script to decide whether to fall back to the interactive prompt. > You solution makes it ALWAYS fall back to the interactive prompt. Actually, using sys.exit() means the program can exit even if python -i is used. You can use: import code code.interact() which emulates the interactive prompt. -- Michael Hoffman