Menu

blank line following multi-line cmd problem

2011-09-07
2013-03-15
  • Mark Thompson

    Mark Thompson - 2011-09-07

    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
       
       
       
       

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-09-07

    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

     
  • Mark Thompson

    Mark Thompson - 2011-09-08

    so it is. thanks Fabio

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.