Issue34091
Created on 2018-07-11 09:02 by maxnoe, last changed 2022-04-11 14:59 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg321417 - (view) | Author: Maximilian Nöthe (maxnoe) * | Date: 2018-07-11 09:02 | |
The REPL won't start in interactive mode, it only starts when explicitly given the `-i` option. The problems IPython is having, e.g. missing syntax highlighting and no tab completion should have the same root. See this issue for mingw: https://github.com/Alexpux/MINGW-packages/issues/730 They fixed it by patching python using this patch: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-python3/1700-cygpty-isatty.patch And this issue at msys2: https://sourceforge.net/p/msys2/tickets/32/ |
|||
| msg321422 - (view) | Author: Martin Panter (martin.panter) * ![]() |
Date: 2018-07-11 09:45 | |
The problem as I understand it is that Msys uses a pipe, but Python by default limits interactive REPL mode to terminals only. The same thing happens if you start Python on a pipe some other way, for instance “cat | python” vs “cat | python -i”. I would prefer if Python decided to use interactive mode when no file name is given, rather than by checking if the file is a terminal. But that would break compatibility. Another tip with Msys: enable unbuffered output with “python -u”. Otherwise output gets buffered, won’t be seen immediately, and may be lost if there is an unclean exit. |
|||
| msg321437 - (view) | Author: Maximilian Nöthe (maxnoe) * | Date: 2018-07-11 10:48 | |
Tab completion does not work in the REPL even when started with `-i -u`, so there might be a deeper problem than just the PIPE that's preventing python from starting in interactive mode. |
|||
| msg321585 - (view) | Author: Segev Finer (Segev Finer) * | Date: 2018-07-13 09:22 | |
I'd assume this is using ConEmu's ChildGui which means it hacks up a MinTTY window to appear inside ConEmu's GUI. MinTTY doesn't use a real terminal but rather pipes as the processes stdio. Any native (non-MSYS2) Windows program would have a problem with this. The known workaround is to launch such programs using WinPTY (Available in the MSYS2 pacman), which creates a real console for the program in the background and communicates it's input/output so that it appear in the original console. Sadly that is a limitation of Windows, as Windows does not supply a proper PTY interface and MSYS2/MinTTY choose not to use something like WinPTY by default. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:03 | admin | set | github: 78272 |
| 2018-07-13 09:22:15 | Segev Finer | set | nosy:
+ Segev Finer messages: + msg321585 |
| 2018-07-11 10:48:06 | maxnoe | set | messages: + msg321437 |
| 2018-07-11 10:36:59 | eric.smith | set | nosy:
+ eric.smith |
| 2018-07-11 09:45:20 | martin.panter | set | nosy:
+ paul.moore, tim.golden, martin.panter, zach.ware, steve.dower messages: + msg321422 components: + Windows |
| 2018-07-11 09:02:12 | maxnoe | create | |
