Duplicate output in Jupyter console when calling external executables using the subprocess module
Steps to reproduce
Open Emacs (GUI or Console mode)
Open any .py file to enter Elpy mode
Make sure the python shell interpreter is set to Jupyter (see Elpy configuration)
Open an Elpy console window (C-x C-z)
Execute the following Python code from the Elpy console window:
import subprocess
subprocess.call('/bin/pwd')
Result: The current working directory is printed twice in the console.
The same happens with the standard output of any executable and if a call to subprocess.call is done while executing any python code from Emacs (e.g. using C-c C-c).
This doesn't occur when using the standard Python console.
Summary
Duplicate output in Jupyter console when calling external executables using the subprocess module
Steps to reproduce
Result: The current working directory is printed twice in the console.
The same happens with the standard output of any executable and if a call to
subprocess.call
is done while executing any python code from Emacs (e.g. using C-c C-c).This doesn't occur when using the standard Python console.
My configuration
OS
Ubuntu Release 23.10 (Mantic Minotaur) 64-bit Kernel Linux 6.5.0-28-generic x86_64 MATE 1.26.2
Result of
(elpy-config)
Elpy configuration in my init.el