Arrêter l'exécution d'un script appelé avec execfile

Est-il possible d'interrompre l'exécution d'un script Python appelé avec le execfile fonctionner sans l'aide d'un if/else? J'ai essayé exit()mais il ne permet pas main.py à la fin.

# main.py
print "Main starting"
execfile("script.py")
print "This should print"

# script.py
print "Script starting"
a = False

if a == False:
    # Sanity checks. Script should break here
    # <insert magic command>    

# I'd prefer not to put an "else" here and have to indent the rest of the code
print "this should not print"
# lots of lines below

source d'informationauteur JcMaco