Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit a function in Python IDLE

What are the ways to edit a function defined in the environment of Python IDLE (or console)?

like image 923
Leonid Avatar asked Jun 10 '11 21:06

Leonid


People also ask

How do you edit a function in Python terminal?

If you're using a terminal with a mouse support (as usual in X) or screen, you just scroll up to the last function definition, copy the source, call the editor and paste to it. Edit to taste, execute.


1 Answers

Short answer: no. Long answer: If you have readline support enabled, you can use the up-arrow to "redefine" it line-by-line.

like image 127
jathanism Avatar answered Oct 02 '22 13:10

jathanism