Ask coding questions

← Back to all posts
Keep python repl 24/7 on
Zumodenaranja73 (0)

hi anyone knows how to keep a PYTHON repl alwyas on? Thanks

Answered by Coder100 (18071) [earned 5 cycles]
View Answer
Coder100 (18071)

Just make an HTTP server!

from threading import Thread
from flask import Flask

app ="test")
def main():
  return "alive!"

def run():'', port=8080)

t = Thread(target = run)

# ... add your code here ...

You have to use a hosting site. Like a HTTP server, and host it there.

CoolJames1610 (764)

Use Flask and uptimer robot to ping the web page