Re: gnulib-tool Python tracebacks after control-C

2024-05-17 Thread Bruno Haible
Collin Funk wrote: > Ah, interesting. I think in English it would mostly depend on the > context. "Interruption" means you are stopping something from > progressing, but I don't think the word itself describes if it is > temporary or not. "Stop" more strongly indicates a permanent halting > of the

Re: gnulib-tool Python tracebacks after control-C

2024-05-16 Thread Collin Funk
Hi Bruno, On 5/16/24 5:52 AM, Bruno Haible wrote: > Yes, that's what I meant. Instead of "*** Stop." maybe "*** Interrupted." > (I don't know which of the two, in English, more clearly indicates that it > cannot be continued. On one hand, a program which received a SIGSTOP > can be continued via S

Re: gnulib-tool Python tracebacks after control-C

2024-05-16 Thread Bruno Haible
Collin Funk wrote: > executing aclocal -I glm4 > ^C/home/collin/.local/src/gnulib/gnulib-tool.py: *** Stop. > $ echo $? > 1 > > Is that similar to what you were thinking of? I'm not sure what to put > for the error message. Feel free to commit something if this works for you. Yes, that's what I m

Re: gnulib-tool Python tracebacks after control-C

2024-05-15 Thread Collin Funk
On 5/15/24 8:45 PM, Bruno Haible wrote: > Can you make gnulib-tool.py print a diagnostic in this case as well? > It does not need to be exactly "caught signal SIGINT", like bash does. > Just an indication that > - gnulib-tool.py > - is being terminated > - due to a signal 2. > Preferrably for

Re: gnulib-tool Python tracebacks after control-C

2024-05-15 Thread Bruno Haible
Hi Collin, > $ gnulib-tool --create-testdir --dir testdir1 > ^C > $ It does not print any diagnostic. While gnulib-tool.sh and subprocesses do print a diagnostic: $ rm -rf ../testdir1; ./gnulib-tool.sh --create-testdir --dir=../testdir1 --single-configure stdbit-h Module list with i

Re: gnulib-tool Python tracebacks after control-C

2024-05-15 Thread Collin Funk
Hi Pádraig, On 5/13/24 2:32 PM, Pádraig Brady wrote: > https://github.com/pixelb/crudini/blob/cbb3b85e/crudini.py#L1134 > Note that also handles a closed stdin (and stdout elsewhere in that util). I just pushed the attached patch following your code there. Works well for me. Thanks for the help.

Re: gnulib-tool Python tracebacks after control-C

2024-05-15 Thread Collin Funk
Hi Pádraig, On 5/13/24 2:32 PM, Pádraig Brady wrote: > I've an 18 year old script template here that silences Ctrl-C spew: > https://www.pixelbeat.org/talks/python/cli_skel.py Ah, okay I think I understand this now. So basically the backtrace is the default excepthook and your code skips running

Re: gnulib-tool Python tracebacks after control-C

2024-05-13 Thread Pádraig Brady
On 13/05/2024 21:48, Collin Funk wrote: Hi Paul, On 5/13/24 9:39 AM, Paul Eggert wrote: I realized that I invoked ' ./gnulib-tool --create-testdir --dir foo stdbit' with the wrong options so I interrupted it with control-C. It then gave me the following long traceback, which is not useful. I

Re: gnulib-tool Python tracebacks after control-C

2024-05-13 Thread Collin Funk
Hi Paul, On 5/13/24 9:39 AM, Paul Eggert wrote: > I realized that I invoked ' ./gnulib-tool --create-testdir --dir foo stdbit' > with the wrong options so I interrupted it with control-C. It then gave me > the following long traceback, which is not useful. I suggest shutting off the > Python tr

gnulib-tool Python tracebacks after control-C

2024-05-13 Thread Paul Eggert
I realized that I invoked ' ./gnulib-tool --create-testdir --dir foo stdbit' with the wrong options so I interrupted it with control-C. It then gave me the following long traceback, which is not useful. I suggest shutting off the Python traceback info after control-C unless perhaps some new deb