Answer the question
In order to leave comments, you need to log in
How to re-import a variable from a Python file?
Good afternoon!
I have a config.py file with some variables
AND in the main.py file the situation is like this:
from config import templates, admins
# ...
def reload():
# ... здесь templates и admins должны заново импортироваться из config-а,
# так как эту функцию я планирую вызывать только в случае обновления этого самого config-a
pass
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