Skip to content
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

Python console is very slow to respond when typing in commands #3533

Closed
blaylockbk opened this issue Oct 13, 2016 · 13 comments
Closed

Python console is very slow to respond when typing in commands #3533

blaylockbk opened this issue Oct 13, 2016 · 13 comments

Comments

@blaylockbk
Copy link

Description

I ran a script in the python console. After it finished, I continue to type commands in the interpreter , but none of these commands are executed. Even a simple "print a" wouldn't execute. Or, if I reassign a "a=5", the variable value in the variable explorer remains unchanged.
The cursor just moves to the next line with the >>> waiting for the next command.

What steps will reproduce the problem?

  1. Open a python console
  2. Run a script
  3. Print a known variable name

What is the expected output? What do you see instead?
I expect it to immediately execute the command within the console, such as return the variable value. The previous spyder version (2.something) didn't have this issue. I just installed spyder version 3.0

Please provide any additional information below

Version and main components

  • Spyder Version: 3.0.0
  • Python Version: 2.7.11
  • Qt Versions: 5.6.0, PyQt5 5.6 on Windows

Dependencies

pyflakes >=0.5.0 :  0.8.1 (OK)
pep8 >=0.6       :  1.5.7 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.1.0 (OK)
pandas >=0.13.1  :  0.14.1 (OK)
numpy >=1.7      :  1.11.0 (OK)
sphinx >=0.6.6   :  1.3.1 (OK)
rope >=0.9.4     :  0.9.4 (OK)
jedi >=0.8.1     :  0.9.0 (OK)
matplotlib >=1.0 :  1.5.1 (OK)
sympy >=0.7.3    :  0.7.5 (OK)
pylint >=0.25    :  1.5.4 (OK)

@ccordoba12
Copy link
Member

Thanks for reporting. I have some questions:

  1. Could you provide a simple example of the file that you're trying to execute?
  2. How did you install Spyder?

@blaylockbk
Copy link
Author

I updated spyder through Anaconda. In the Anaconda command promt: conda
update spyder.

Just about any code results in the error. I attached a screen shot. Here is
some:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from datetime import datetime, timedelta

import os
import sys

def do_some_math(a):
# stuff for making barbs
return a+300*np.pi

if name == 'main':
a = 5
c = do_some_math(a)
print c

http://kbkb-wx.blogspot.com/ Brian

On Thu, Oct 13, 2016 at 12:00 PM, Carlos Cordoba notifications@github.com
wrote:

Thanks for reporting. I have some questions:

  1. Could you provide a simple example of the file that you're trying
    to execute?
  2. How did you install Spyder?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3533 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF9cjWriBh9HlamVQ6W77FOdIi8kPA0_ks5qznGvgaJpZM4KWIhK
.

@blaylockbk
Copy link
Author

blaylockbk commented Oct 13, 2016

spyder
You can see that I've run the script several times, and nothing shows up in the variable explorer.
I can run this just fine outside of spyder.

@jitseniesen
Copy link
Member

Just out of curiosity: What is the use case for the Python console (as opposed to the IPython console)? I never use it myself. I am wondering whether we should just remove it, or maybe do not show it in the default layout.

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 17, 2016

@jitseniesen, my plan was to remove for 3.0 but I didn't have time to do it at the end :-)

There are some things that still work better in the Python console:

  1. History browsing while you are on Pdb.
    2, The ability to evaluate a file in a dedicated console (i.e. a file per console evaluation model).
  2. The ability to browse environment variables and sys.path contents.

2. and 3. can be easily migrated to the IPython Console, and we could do that in the 3.x series :-) Then I think we could remove the Python console in 4.0 because it's terribly broken (at least on Windows)

@FSJMGitHub
Copy link

I have also problems with python console. I reported on issue #3623 that I closed by error

@ccordoba12
Copy link
Member

@jitseniesen and @goanpeca, the Python console is working so badly on Windows that I think we should disable it for 3.1 (not remove it, just disable it) and ask our juniors to solve points 2. and 3. for the IPython Console (which are not that hard :-).

What do you think?

@goanpeca
Copy link
Member

@ccordoba12 you know I am in on removing it for good.

The only thing we need to get this going is to allow running in a new IPYTHON console in the run preferences, and make sure that process is fast.

@ccordoba12
Copy link
Member

you know I am in on removing it for good.

We can't remove it for 3.0 because that'd be a major breakage, but I'm all for removing it for Spyder 4.0 :-)

The only thing we need to get this going is to allow running in a new IPYTHON console

Yep, that's point 2.

@jitseniesen
Copy link
Member

the Python console is working so badly on Windows that I think we should disable it for 3.1 (not remove it, just disable it)

Agree wholeheartedly.

@wtheis
Copy link

wtheis commented Oct 31, 2016

If you deactivate the Python console, could you please provide a run option (selectable as default in the preferences) which resets the IPython console namespace before running a script (execute reset -f before runfile(..)).

This would help in teaching Python to beginners which I am currently doing using the Python console. Using a dedicated IPython console instead of a dedicated Python console is too slow for my usage case.

@ccordoba12
Copy link
Member

@wtheis, ok, we'll take that into account for 3.1 :-)

@ccordoba12
Copy link
Member

This is (at the end) the same problem as the one on issue #1831, so I'm closing it.

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

No branches or pull requests

6 participants