ipython: Multiple commands on the same line and newlines

Andrea Crotti andrea.crotti.0 at gmail.com
Sun Apr 17 08:11:01 EDT 2011


Phil Winder <philipwinder at gmail.com> writes:

> Yes, that does not produce an error, but it does not "work". Please
> refer to my first post. Try the first code, you will get a syntax
> error. Placing things on one line makes for easy history scrollback.
> In your version you will have 2 lines of history for the x = 0 term
> and the while ... term. I don't want to have to press up twice,
> especially when the code was in the distant past! Also cpaste might be
> ok for scripting, but it looks too clumsy to use at the command line.
>
> Cheers,
> Phil

Well I guess that's the way it is with the interpreter..
But I don't see the sense in doing everything from there, just write the
code to a file and use %edit from ipython to change and run it, it's
quite nice and easy too.



More information about the Python-list mailing list