import sys def end(): foo=raw_input() sys.exit() print 'Press enter to Exit python and Terminal' end()
当我们运行程序时,我们应该能够退出Python解释器和终端本身.但它只退出python解释器,而不是终端.
提前致谢.
python linux terminal python-2.7 python-3.x
linux ×1
python ×1
python-2.7 ×1
python-3.x ×1
terminal ×1