Reputation: 901
In a python shell I am defining a function. Now I made a mistake, and would like to jump up 4 lines to edit this statement: for i in range(N):
>>> def bisect(a,b,N):
... for i in range(N):
... num = f((a-b)/2.0)
... if num == 0:
... print (a-b)/2.0
... elif ()
How can I navigate up and down the shell to make modifications?
Upvotes: 2
Views: 271
Reputation: 7930
You can't. Use another Python shell like IPython, for example.
The Qt console for IPython (ipython qtconsole
) or the IPython Notebook offer the feature you want. You can just navigate in the code using the arrow keys while writing it.
Upvotes: 2