|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from calculate.console.application.cl_client import main
|
|
|
|
|
from calculate.console.application.cl_client import main, StoppableThread
|
|
|
|
|
from calculate.console.application.function import _print
|
|
|
|
|
reload(sys)
|
|
|
|
|
sys.setdefaultencoding("utf-8")
|
|
|
|
@ -28,8 +28,10 @@ setLocalTranslate('calculate_console',sys.modules[__name__])
|
|
|
|
|
if __name__=='__main__':
|
|
|
|
|
__builtin__.__dict__['_print'] = _print
|
|
|
|
|
try:
|
|
|
|
|
sys.exit(main())
|
|
|
|
|
wait_thread = StoppableThread()
|
|
|
|
|
sys.exit(main(wait_thread))
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
wait_thread.stop()
|
|
|
|
|
red = '\033[31m * \033[0m'
|
|
|
|
|
print '\n'+red+_('Interrupted by user')
|
|
|
|
|
sys.exit(1)
|