In the PyDev Console interactive shell, hitting enter to add a blank line to the end of a multi-line command doesn't execute the code, it just adds another continuation line.
>>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
C:\Python27\python.exe 2.7.1 (r271:86832, Nov 27 2010, 18:30:46)
PyDev console: using default backend (IPython not available).
>>> for x in range(1,11):
… print repr(x*x).rjust(2), repr(x*x*x).rjust(3),
… print repr(x*x*x).rjust(4)
…
…
…
etc.
Using Eclipse Indigo w/ PyDev 2.2.2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's expected. To evaluate it you have to remove the indentation (until you dedent, it's considered that you're still in the for scope in that example).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the PyDev Console interactive shell, hitting enter to add a blank line to the end of a multi-line command doesn't execute the code, it just adds another continuation line.
>>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
C:\Python27\python.exe 2.7.1 (r271:86832, Nov 27 2010, 18:30:46)
PyDev console: using default backend (IPython not available).
>>> for x in range(1,11):
… print repr(x*x).rjust(2), repr(x*x*x).rjust(3),
… print repr(x*x*x).rjust(4)
…
…
…
etc.
Using Eclipse Indigo w/ PyDev 2.2.2
That's expected. To evaluate it you have to remove the indentation (until you dedent, it's considered that you're still in the for scope in that example).
Cheers,
Fabio
so it is. thanks Fabio