Spyder 3.0.1 not running scripts in "Python console" mode

339 views
Skip to first unread message

Fausto A. A. Barbuto

unread,
Oct 27, 2016, 10:08:48 AM10/27/16
to spyder
If I write the following lines on a Spyder "Python console":

for i in range(0,10):
    print "i = ", i

I get the expected answer. However, if I save the above lines as a .py file
and run it in "Python console" mode, I get is this:

runfile('C:/Users/fausto/Documents/Programs/Python/xyz.py', wdir='C:/Users/fausto/Documents/Programs/Python')

and the answer is not displayed until I press ENTER. What I'm doing wrong?

Thanks,

F.


Greg Bullock

unread,
Dec 28, 2016, 12:36:20 PM12/28/16
to spyder
I have the same problem.  A related problem (or more likely, another symptom of the same problem) is that opening a new Python Console usually displays only fragments of the banner text:


ontinuum.io/thanks and https://anaconda.org
>>> )] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://cPython 2.7.12 |Anaconda 4.2.0 (32-bit)| (default, Jun 29 2016, 11:42:13) [MSC v.1500 32 bit (Intel


with no "final" >>> prompt.  (Note the >>> embedded in the above quoted banner text.)  After I press ENTER, the remaining banner text is displayed along with the >>> prompt.  The specific fragment displayed from the banner text seems to change a little bit each time I open a new Python Console.  Also the location of the embedded >>> prompt.  For example, opening another Python Console just now displays this fragment:


://anaconda.org
>>> n32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and httpsPython 2.7.12 |Anaconda 4.2.0 (32-bit)| (default, Jun 29 2016, 11:42:13) [MSC v.1500 32 bit (Intel)] on wi


Problems also occurs running scripts in the pdb debugger -- at various stages I have to press an extra ENTER.

The problems occur only in the Python Console, not in the IPython Console.  In fact, I've switched to using IPython Console because of these oddities.

I'm using Python 2.7.12 32-bits and Spyder 3.02 on Windows 7 64-bit.  How about you?

Carlos Córdoba

unread,
Dec 28, 2016, 12:40:50 PM12/28/16
to spyd...@googlegroups.com
Hi,

We're very sorry for this inconvenience. The Python Console is essentially broken on Windows because of the errors you reported, which we don't know how to fix (I've invested a lot of time on that, but had no luck with them).

We're in the process of moving all its functionality to the IPython Console, so we can disable it in Spyder 3.2.


Thanks for your patience,
Carlos

El 28/12/16 a las 03:20, Greg Bullock escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Greg Bullock

unread,
Dec 28, 2016, 2:47:09 PM12/28/16
to spyder
Thank you, Carlos.

(And no apology, please.  I love Spyder!  I should be thanking you, not accepting your apology.)

It appears that unchecking the "Colorize standard error channels using ANSI escape codes" in Preferences: Python console averts the problem (at the expense of colorized display, of course).  For me, this is an acceptable trade off, and I'll continue to run the Python console this way.

Perhaps the problem stems from multithreading somewhere?

If this proves to be a reliable way to run the Python console, then it should suffice to leave the Python console as an optional console and remove only the "Colorize standard error channels using ANSI escape codes" option.

Regards.
Greg
Reply all
Reply to author
Forward
0 new messages