tags:

views:

323

answers:

2

Question so easy that fitted in the title :) Eclipse (pydev): Is it possible to assign a shortcut to send selection to the python console?

+1  A: 

You can only assign shortcuts to "actions". Actions bound to buttons (for example, the toolbar) and menus. If you have a menu for this, you can bind a key to it. If not, then you will have to open an enhancement request in the pydev project.

Aaron Digulla
"If you have a menu for this"? Do you (Aaron?) have a menu for this. How do we find a menu? Since there is 0 Pydev documentation, it's hard to know. Do we need to open an enhancement request or not?
Frank Krueger
I haven't look at this. If there is no automatic way to do this in the UI, you must open an enhancement request.
Aaron Digulla
+1  A: 

If you mean to the interactive console, use ctrl+alt+enter in the pydev editor (version 1.5).

That action does a number of things:

  1. opens an interactive console view if it's not opened already
  2. sends the selected text to the console
  3. makes an execfile of the current editor (if no text is selected)
Fabio Zadrozny
awesome, this works for me. Thanks!
rem7