My code is not giving output

Why my code is not giving output? when I tap on run, the output console shows up blank
Repl link:

import pyotp

totp_pin = str(

On default, Replit only runs the file so you will need to find a way to execute the code in the file. Wrapping it in a function should work.

Thanks for the info @jcarlsontcsp,

Could you please help me knowing how to run different python files ?

To run functions in other python files, you can import the files in and then call your function.


# Import the File
import totp_main

# Run a function

You can actually change what file is run, in the .replit file, change these lines (where it says, change it to whatever file you want to run when the run button is clicked):

run = "python3"
entrypoint = ""

I tried, its not working.
When I tap on run, the output console shows up blank again.

My file is
I tried like this below –

run = “python3”
entrypoint = “”

run = “python3”
entrypoint = “”

run = “python3”
entrypoint = “”

None of them did worked.

Your file seems to be named in lowercase:

run = "python3"
entrypoint = ""

But also, you’ve added that code in, not .replit.
show hidden files
.replit file
But you don’t have to do any of this if you were just going to use the file and import the parts you want to run in main like @jcarlsontcsp suggested.

Thank you so much @MattDESTROYER for the info. It worked.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.