gpython icon indicating copy to clipboard operation
gpython copied to clipboard

Ctrl+Z and Ctrl+C don't exit GPython on Windows 10

Open ghost opened this issue 6 years ago • 3 comments

Currently it's hard to close the REPL on Windows using standard terminal. On WSL Ubuntu it works with Ctrl+Z, in Windows nothing happens.

ghost avatar Sep 15 '19 10:09 ghost

Does CTRL-D exit the REPL under Windows?

I think this might be a bug in https://github.com/peterh/liner/ which gpython uses.

ncw avatar Sep 15 '19 11:09 ncw

That's interesting. Ctrl+D does work perfect. Then this can get closed for now, I think.

ghost avatar Sep 15 '19 11:09 ghost

That's interesting. Ctrl+D does work perfect. Then this can get closed for now, I think.

In windows the exit sequence is CTRL-Z RETURN. It may be possible to emulate that as well in gpython.

What happens is this

This appears when you press CTRL-Z

>>> ^Z

And only when you press RETURN after that does the interpreter exit.

So we could emulate this just by looking for a string with CTRL-Z in it maybe.. Not sure exactly how liner would deal with that though.

I'll leave this open as an enhancement if someone wants to have a go at it.

ncw avatar Sep 15 '19 11:09 ncw