Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python IDLE equivalent of CTRL-R in R

Tags:

python

r

If you have a script open in the Windows version of R, you can run a line (or section of highlighted code) in the shell by hitting CTRL-R (believe it's command-enter in apple version). Is there similar functionality for IDLE? Many thanks

like image 712
Zubin Avatar asked Mar 29 '11 16:03

Zubin


People also ask

What is Ctrl R in Python?

Ctrl-r. Reverse-search through command history. The reverse-search can be particularly useful. Recall that in the previous section we defined a function called square . Let's reverse-search our Python history from a new IPython shell and find this definition again.

How do I run a Python command in IDLE?

To execute a file in IDLE, simply press the F5 key on your keyboard. You can also select Run → Run Module from the menu bar. Either option will restart the Python interpreter and then run the code that you've written with a fresh interpreter.

How do I run a selected line in IDLE?

IDLE with IdleX supports the ability to run a single line of code or a selection by pressing F9. It also has subCodes which allows you to run code in between '##' comments. It has the same effect as highlighting a lot of code for execution, but you don't need to keep highlighting each time.

What does IDLE stands for in Python?

IDLE is Python's Integrated Development and Learning Environment.


2 Answers

No

In the shortcut key list in IDLE, in Options > Configure IDLE > Keys, in the Action - Key(s) list, one does not find any shortcut key for executing selected code.

like image 133
Geoffrey Avatar answered Sep 29 '22 21:09

Geoffrey


IDLE with IdleX supports the ability to run a single line of code or a selection by pressing F9. It also has subCodes which allows you to run code in between '##' comments. It has the same effect as highlighting a lot of code for execution, but you don't need to keep highlighting each time.

like image 34
Roger Avatar answered Sep 29 '22 22:09

Roger