Reputation: 717
When I use R and execute a command in the command window, I can just press up and I get the last executed command in the current command line. What key do I need to press in order to get the same in Python?
Edit: When I asked this question, I did not know what IDLE or iPython is. I just googled "download python" and downloaded it. But now I know I am using IDLE.
Upvotes: 1
Views: 445
Reputation: 367
For anyone else who comes upon this looking for a mac solution, I found that Contrl+Option+n and Contrl+Option+n worked to cycle through previously executed lines in IDLE (Python) 2.7.10 on OS 10.8.5.
I realize that this should work without the Option, but for months I needed to use both modifier keys to execute the shortcut properly.
Upvotes: 1
Reputation: 44614
If you're in IDLE, use Alt+P and Alt+N to navigate your command history.
Upvotes: 3