trickery to keep the DOS window open if there was exception

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@329 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
jvr 2002-09-10 17:25:41 +00:00
parent 1a59d1d577
commit 0cf88edbbd

View File

@ -223,4 +223,15 @@ def main(args):
if __name__ == "__main__":
main(sys.argv[1:])
try:
main(sys.argv[1:])
except KeyboardInterrupt:
print "(Cancelled.)"
except:
import traceback
traceback.print_exc()
if sys.platform == "win32":
import msvcrt
print '(Hit any key to exit)'
while not msvcrt.kbhit():
pass