New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConEmu Far plugin and Python 3 console output #1307

Closed
plastikat opened this Issue Nov 2, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@plastikat

plastikat commented Nov 2, 2017

ConEmu 170807 [32]
OsVer: 6.3.9600.x32, Product: 1, SP: 0.0, Suite: 0x100, SM_SERVERR2: 0
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32

Probably related: #546, #457

With version 3.3 Python had introduced Python Launcher for Windows. In short (and adhering to my use case), when a Python script with a shebang like #!/usr/bin/env python3 is launched on Windows, it is in fact launched by py.exe, which, in turn, launches the appropriate Python interpreter, just as the image below demonstrates (this script was launched implicitly, like this: py_test1.py):

farconemu_python3

This might put ConEmu to complexities with hooks. Things I observe for already a long time is that the output of such script (both stdout and stderr) don't make it to the buffer maintained by ConEmu Far plugin (the one displayed with "View/Edit console output"), which is very inconvenient when the output takes more than one screen.

I should add that in this particular case ConEmu is run with its "Alternative" and "BufferHeight" modes off. Also, the output is captured right if I run the same script explicitly, like this: py C:\Programs\scripts\py_test1.py, though this time the process tree differs a bit:

farconemu_python3_alt

Another ConEmuC.exe process is prepended to py.exe when run this way. Maybe things should be handled the same way for implicit runs too?

Maximus5 added a commit that referenced this issue Nov 4, 2017

gh-1307: Turn on ‘Long console output’ when user runs `script.py` ass…
…ociated with `py.exe`

  The script is executed by Far3 via ShellExecuteEx(script.py),
  which in turn runs CreateProcess(py.exe, script.py) in background thread

Maximus5 added a commit that referenced this issue Nov 7, 2017

gh-1307: Turn on ‘Long console output’ when user runs `script.py` ass…
…ociated with `py.exe`

  The script is executed by Far3 via ShellExecuteEx(script.py),
  which in turn runs CreateProcess(py.exe, script.py) in background thread

@Maximus5 Maximus5 closed this Nov 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment