Skip to content
← Back to Community
Keep python repl 24/7 on
Profile icon
Zumodenaranja73

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

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
elipinhasov
Profile icon
Zumodenaranja73
Comments
hotnewtop
Profile icon
Coder100

Just make an HTTP server!

from threading import Thread from flask import Flask app = Flask.app("test") @app.route("/") def main(): return "alive!" def run(): app.run(host='0.0.0.0', port=8080) t = Thread(target = run) t.start() # ... add your code here ...
Profile icon
codingMASTER398
Profile icon
Coder100

shameless plug? @codingMASTER398

Profile icon
codingMASTER398

@Coder100 ... maybe

Profile icon
stansters

@Coder100 for anyone using this now, remove the ".app" part on line 4 (thanks Coder100, you helped me alot by sending that :) )

Profile icon
RYANTADIPARTHI

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

Profile icon
CoolJames1610

Use Flask and uptimer robot to ping the web page

Profile icon
jmccaslin2019

@CoolJames1610 does this still work my repl.it that ive made for reddit bots doesnt seem to be staying alive