A supplement to the Brushing Up Science post: Invest in a good text editor
I like to use both Python and Sublime Text. But I also like Spyder as a Python IDE. Therefore, although I edit in Sublime, to run scripts or evaluate lines of code in a REPL-like fashion, I do so via Spyder. Detailed below is how I achieve this in such a way that if I want to run the file or evaluate the selected lines, I simply press Shift + Enter.
This example works for Windows using AutoHotKey. For Linux instructions, click here.