• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisiona6ded9f1f3f9e41fea0a1dd9f8a28fcf55f9761d (tree)
l'heure2012-12-24 10:07:31
AuteurShinya TAKEBAYASHI <omoikanenomikoto@gmai...>
CommiterShinya TAKEBAYASHI

Message de Log

Implemented Ctrl-C process

Change Summary

Modification

--- a/hl.py
+++ b/hl.py
@@ -1,6 +1,6 @@
11 #!/usr/bin/env python
22
3-import sys, os, re
3+import sys, os, re, signal
44 from libs import term, config, general
55
66 include_path = []
@@ -59,8 +59,13 @@ def findheader(filename):
5959
6060 print('')
6161
62+def sigint(num, frame):
63+ print('process interrupted.')
64+ sys.exit(2)
6265
6366 if __name__ == '__main__':
67+ signal.signal(signal.SIGINT, sigint)
68+
6469 if len(sys.argv) == 1:
6570 general.print_usage()
6671 sys.exit(2)