sys setup: macOS 10.14.5, python2.7
shell: zsh 5.7.1
running script can be stopped by sending KeyboardInterrupt with Ctrl-C, but won't go back to the shell before running the script normally.
$ sgp -c sh000001 # sgp is a zsh alias
***** start *****
名称 股价
深证成指 8922.69
上证指数 2898.6961
上证指数 2898.6961
***** end *****
***** start *****
名称 股价
深证成指 8922.69
上证指数 2898.6961
上证指数 2898.6961
***** end *****
^CTraceback (most recent call last):
File "/Users/tscapple/bin/stock-get-price", line 102, in <module>
time.sleep(options.sleep_time)
KeyboardInterrupt
Ctrl-D won't help either. Have to kill this session.