How can I avoid to use global variables? (python - flask-socketio app)
问题 I'm trying to figure out how to not use global variables for my application but I can't think of anything else. I'm actually coding a web interface with the help of the Flask-SocketIO module to interact in real time with a music player. This is a snippet of my code containing the play function (I think I only need one example and then I can adapt it for all the other functions): from flask import Flask, render_template from flask_socketio import SocketIO app = Flask(__name__) socketio =