LaVOZs

The World’s Largest Online Community for Developers

'; python - How can I call a variable from inside a function in another file in Python3 to the currrent file? - LavOzs.Com

I have a Flask app with 2 files- app.py and send.py. After running the operations in app.py, it runs send.py. send.py needs a variable from inside a function proceed() in app.py. This variable is obtained by getting data from a form (with requests). This can be done only in app.py. This variable is compulsory for send.py to work.

I tried- import app, and did a = app.email but used to get an AttributeError.

If I do from app import proceed, I get an error that Flask has no email.

Related