Importing sys will not be enough to make exit
live in the global scope.
You either need to do
from sys import exit
exit()
or
import sys
sys.exit()
Note that, as you are also using argv, in the first case you should do from sys import argv,exit
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…