Answer the question
In order to leave comments, you need to log in
Is it possible to recalculate a variable that is in another module?
I have two scripts. In script No. 1, I write the functions and variables I created. And in script No. 2 I use these functions and variables.
Script #1 has variables
wb = load_workbook(filename=path_excel_limit_obyavlenii)
ws = wb.active
wb = load_workbook(filename=path_excel_limit_obyavlenii)
ws = wb.active
Answer the question
In order to leave comments, you need to log in
Do you want the constants to change based on the results of the second script? And the first script next time used the new constants?
Then probably they should be moved to a separate file or database. And from there to pull up at each start of the 1st script.
Or, as an option, run the script with the necessary parameters.
You can reload the script like this:
import my_module
reload(my_module)
from my_module import *
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question