I click run and the code doesn't run in the shell

Question:
I click run and the code doesn’t run in the shell.

Replit Profile: https://replit.com/@jibranulali1

The shell is like a terminal or command prompt. By default, code output goes into the console, instead of the shell. It keeps things separate, if you were to run the program on your own machine without using your own terminal, it would have it’s own console too.

If you want to run your code in the shell, you absolutely can. Given you’re writing Python, just open the shell tab and enter python3 011_identity.py.

If you’re referring to the fact that main.py is run by default, simply open the .replit file and change or add (below entrypoint is good) the run command to something like this: run = ["python3", "011_identity.py"].

1 Like

How do i open the “.replit” file? Forgive me I’m new if this is an obvious question.

1 Like

It’s in the file hierarchy, but it’s hidden by default. Click the three vertical dots and select ‘show hidden files’ to see it.

This is exactly the right place for ‘obvious’ questions! :smile:

2 Likes

Question: how to get output in shell

Replit Profile: https://replit.com/@RrishabhRai

You’d need to run our command manually through shell to get your output there. However, your output already appears in its own Console tab, like so: