import subprocess # subprocess.Popen("FLASK_APP=server.py FLASK_DEBUG=1 FLASK_ENV=development flask run --port 7860", shell=True).communicate() subprocess.Popen("python server.py", shell=True).communicate()