Unless you've figured it out? In which case please say, because I want to code python like this.
Specifically I write code in my editor, hit a keystroke and all the code at the cursor gets sent to my running python and evaluated. The editor needs to be aware of python's indenting rules so it can do this, but once again if you've worked out a nice way to do this please say. Minimal keystrokes required would be great =)...
I'm not really requiring that the evaluated output gets sent to the editor, though of course that would be ideal, because in the worst case I can side-by-side the editor and the terminal.
From my perspective jupyter notebooks get kind of close, but I'm not coding in a file, so it's not quite ideal.