Reputation: 183
If I open the Pycharm IDE, go to "tools" and select "Python Console", and copy and paste
a=1
b=1
c=1
into the console, how do I execute this? If my cursor is at the end of the script (i.e., placed after c=1), I can just hit enter and it works. But the script will not execute if the cursor is placed on one of the first two lines. Hitting Enter only adds a new line between a=1 and b=1. Shift+Enter doesn't work either. Does anyone know how to execute the code without worrying if the cursor is at the very end of the script?
Upvotes: 1
Views: 7841
Reputation: 212
To run source code from the editor in console:
Upvotes: 4