ipython: Multiple commands on the same line and newlines

Phil Winder philipwinder at gmail.com
Sun Apr 17 14:40:45 EDT 2011


On Apr 17, 1:11 pm, Andrea Crotti <andrea.crott... at gmail.com> wrote:
> Phil Winder <philipwin... 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.

Ok, thanks all. It's a little disappointing, but I guess that you
always have to work in a different way when you move to a new
language. Andrea's %edit method is probably the best compromise, but
this now means that I will have to learn all the (obscure) shortcuts
for vi!

Cheers,
Phil



More information about the Python-list mailing list