Giter VIP home page Giter VIP logo

Comments (10)

iblislin avatar iblislin commented on June 8, 2024

Currently we do it already

from zdict.

pi314 avatar pi314 commented on June 8, 2024

But...
2015-10-21 23 55 15

from zdict.

iblislin avatar iblislin commented on June 8, 2024

Oh... we only catch it on shell mode

from zdict.

pi314 avatar pi314 commented on June 8, 2024

Looks like I have something to contribute (thumbsup)

from zdict.

iblislin avatar iblislin commented on June 8, 2024

👍

from zdict.

wdv4758h avatar wdv4758h commented on June 8, 2024

👍

from zdict.

fkztw avatar fkztw commented on June 8, 2024

I don't get it.
How are you going to implement this feature?
This exception can happen in anywhere depends on the timing you press ^C
You can try it a little more times then you will know.
It's just like you cancel the program even before it starts.
Just like u type ipython and press ^C before the prompt shows up.

from zdict.

fkztw avatar fkztw commented on June 8, 2024

http://stackoverflow.com/questions/21120947/catching-keyboardinterrupt-in-python-during-program-shutdown
http://stackoverflow.com/questions/1187970/how-to-exit-from-python-without-traceback
http://stackoverflow.com/questions/4205317/capture-keyboardinterrupt-in-python-without-try-except
Maybe helpful. maybe

from zdict.

fkztw avatar fkztw commented on June 8, 2024

Can @pi314 reply my question above? I really want to know how to do it.
The pic you gave above showed the KeyboardInterrupt happened while importing the argparse module.

The most closed solution I can imagine is that we add a singal handler in the scripts/zdict even before the line from zdict import zdict but I don't think it's a good solution.

from zdict.

pi314 avatar pi314 commented on June 8, 2024

@M157q: Well, I was going to catch exceptions on zdict.lookup(), but I didn't found that my screenshot shows it explode on argparse

from zdict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.