Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><i>Although this isn't <em>strictly</em> an answer to what was asked initially, it might help someone looking here that had the same problem as me...</i></p> <p>I'm a Java developer mainly, so have the Java view open almost all the time. However, sometimes I want to run some python file to test something (or just create a quick python script, and run it)...</p> <p>In the Java editor, if the current class has a <code>main(String[] args)</code> method, I run it with (and popup the dialog to ask me what exactly I'd like to run in the middle)</p> <p><kbd>alt</kbd>+<kbd>shift</kbd>+<kbd>x</kbd>, <kbd>j</kbd></p> <p>Unfortunately, that doesn't work in the Python view, and I've not found a similar solution - it just asks me if I'd like to run it as a Java app... however, as the VonC says, you can run the last run thing (provided you've set the preferences accordingly) with </p> <p><kbd>ctrl</kbd>+<kbd>f11</kbd></p> <p>and this seems work well with python run configurations too.</p> <p><em>But...</em> What if the last thing I ran was a Java program, but I now want to run the active <code>.py</code> file? Previously, to run the <code>.py</code> file, I'd have to go digging through the buttons on the toolbar with the mouse, and I tend to prefer keyboard shortcuts... </p> <p><strong>Solution!</strong> So, finally I come to the actual useful bit of this answer - I just discovered by accident (typing Ivan's suggested shortcut, but missing!), it appears that </p> <p><kbd>f9</kbd> </p> <p>will run the currently active python file. </p> <p>Hope that helps someone get just that little bit faster...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload