Ask coding questions

← Back to all posts
Run button in Python editor: does it work only for
PaoloAmoroso (186)

It seems that the run button in the code editor of Python REPLs works only for the file, not for other source files. Do I understand correctly?

I'm asking because when I click run in files other than nothing seems to happen in the Python shell, no code is apparently evaluated.

Answered by mat1 (4381) [earned 5 cycles]
View Answer
mat1 (4381)

Yes, is the default file that is run and there's not really a practical way to change this at the moment. You can however, run other py files by doing import otherfile at the top of

Please upvote my comment if it was helpful or useful. Thank you!

PaoloAmoroso (186)

@mat1 Thanks, for the time being that's an acceptable workaround.

PaoloAmoroso (186)

@mat1 I've submitted a feature suggestion to make run work also in other Python source files.