spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.11k stars 1.57k forks source link

Option `Hide command line output windows generated by the subprocess module` is not working without `use symbolic math` #12933

Open master-nemo opened 4 years ago

master-nemo commented 4 years ago

Issue Report Checklist

Problem Description

Option Hide command line output windows generated by the subprocess module is not working without use symbolic math.

What steps reproduce the problem?

  1. execute this for clean installation

    conda create --name tmp python --no-default-packages
    activate tmp
    conda install spyder sympy
    (tmp) #  where python
    C:\dev\Anaconda3\envs\tmp\python.exe
    C:\dev\ANACONDA3\python.exe
    spyder --reset
  2. Start Spyder from the windows menu shortcut or from win+R (not from console! it works fine when Spyder starts from a console )

  3. Ensure options is set to

    • [ ] use symbolic math - false
    • [x] Hide command line output windows generated by the subprocess module - true screenshot0
  4. execute from sympy.abc import a ; a in cell or ipython console

What is the expected output? What do you see instead?

Expected: no other windows on screen when processing command. Instead: two console windows (...latex.exe and ...dvipng) with is shown and disappeared.

screenshot1

upd: note: when [x] use symbolic math is enabled - it works as expected.

Versions

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.4.1 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.13.0 (OK)
jedi =0.15.2                   :  0.15.2 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.2 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.5.2                   :  0.5.2 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=0.25                  :  2.5.2 (OK)
pyls >=0.31.9;<0.32.0          :  0.31.10 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.0 (OK)
qtconsole >=4.6.0              :  4.7.4 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.0.3 (OK)
spyder_kernels >=1.9.1;<1.10.0 :  1.9.1 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  18.1.1 (OK)

# Optional:
cython >=0.21                  :  None (OK)
matplotlib >=2.0.0             :  None (OK)
numpy >=1.7                    :  None (OK)
pandas >=0.13.1                :  None (OK)
scipy >=0.17.0                 :  None (OK)
sympy >=0.7.3                  :  1.5.1 (OK)
steff456 commented 4 years ago

Hi @master-nemo,

Can you explain me why don't you want to use the symbolic math option if you will be using sympy?

master-nemo commented 4 years ago

When use symbolic math is enabled, Spyder executes this code at console start:

These commands were executed:
from __future__ import division
from sympy import *
x, y, z, t = symbols('x y z t')
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)

Warning: pylab (numpy and matplotlib) and symbolic math (sympy) are both
enabled at the same time. Some pylab functions are going to be overrided by
the sympy module (e.g. plot)

It can collide with my variables. Of course I can del x,y... but it seems like a dirty patch.

So, yes, you are right - this issue is not very important, but it still looks like a small bug.