Answer the question
In order to leave comments, you need to log in
I'm trying to implement a panel, right now I'm stuck on a circular import, how can I make it not exist?
main.py code (Which runs first):
import mrwolfsite
mrwolfsite.run_this()
bot.run("My Token")
import askinfo
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def info_bot():
return render_template('index.html', count=askinfo.bot_guild_count_reply())
def run():
app.run(host='0.0.0.0', port=8080)
def run_this():
server = Thread(target=run)
server.start()
from main import bot_guild_count, bot_guilds
def bot_guild_count_reply():
return bot_guild_count()
def bot_guilds_reply():
return bot_guilds()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question