Skip to content
← Back to Community
IDE console not working
Profile icon
JiQoyNicholas

Hi All,

the interactive console returns information based on typed commands, however the IDE doesnt execute what I've entered in.

IDE:
print("hello")
---Clicks run---
Interactive shell:
Nothing returned

Interactive shell:
print("hello")
(>) Hello

Could someone explain if I'm doing something incorrectly?

Voters
Profile icon
PraveennaBharat
Profile icon
JiQoyNicholas
Comments
hotnewtop
Profile icon
WilliamPenrod

You need to put that code in the main.py that repl created, or call it from there.
The way they compile and run your code starts with the main.py file they create, you will need to call other files/functions from there, even if they have the same name.

Profile icon
Vandesm14

Can you provide the link to your repl?

Profile icon
JiQoyNicholas
Profile icon
Vandesm14

@JiQoyNicholas You'll need to either import and run the code (in main.py), paste it in a function, or just paste it into main.py since repl.it only runs that file on startup. As of now, there is no way to run specific files.

Profile icon
theangryepicbanana

Did you try pressing the run button completely?

Profile icon
JiQoyNicholas

yes. this issue appears to be the main.py file.
I wasnt aware that only the main.py file gets executed. I read that I'll have to make my new code into a function, import that file and function, and it should work. If there's another way I'd love to hear it.
@theangryepicbanana

Profile icon
theangryepicbanana

@JiQoyNicholas why don't you just make a new repl?