curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Making Python Script Exit Completely with One Ctrl+C

From: Dan Fandrich via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 11 Dec 2023 16:39:43 -0800

On Tue, Dec 12, 2023 at 08:12:42AM +0800, Hongyi Zhao via curl-users wrote:
> On Sun, Dec 10, 2023 at 2:44 PM Hongyi Zhao <hongyi.zhao_at_gmail.com> wrote:
> >
> > > The alternative SIGINT handler solution should also work and may
> > > be more elegant, depending on your point of view.
> >
> > I've already used the following code snippet:
> >
> > def sigint_handler(signal, frame):
> > print(f"KeyboardInterrupt at line {frame.f_lineno}")
> > sys.exit(0)
> >
> > signal.signal(signal.SIGINT, sigint_handler)
> >
> >
> > So, I don't understand why you still like the above.
>
> I meant to say the following:
>
> So, I don't understand why you still said the above words.
>
> > > In any case, the issue has turned out to be unrelated to the topic of this
> > > list, so you're better off finding a PyCurl forum if you prefer another
> > > solution.

The topic has drifted away from the topics covered by curl-users. I suggested a
few ways you could overcome this issue and you're free to choose whatever
method you think works best in your case.

Dan
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-12-12