i have 2 modules that are somewhat related. they both get imported in sequence, usually with nothing between being imported, by the script that needs them. is there a way for the 1st one to leave some data for the 2nd one? they will know each other's name, but having one of them import the other is not an option (because of cases where one one of them is to be imported).
Skaperen Wrote:is there a way for the 1st one to leave some data for the 2nd one?
What does it mean? If
mod2
needs data from
mod1
, then why doesn't mod2 import mod1? It looks like a wrong design that needs to be fixed.
both modules need to be imported like from modname import *
. in some cases they can interfere. but if the data is passed on, the 2nd one can avoid that.
The modules need to be imported that way because that's how you have designed your program, which does not negate the point made by Gribouillis.
so i should assume there is no way to do that.
It is very difficult to understand what you want to do. Why don't you just post the modules?
(Nov-24-2019, 09:58 PM)Gribouillis Wrote: [ -> ]It is very difficult to understand what you want to do. Why don't you just post the modules?
as is very often the case, code is, at minimum, not complete. in this case, things are not integrated and there is no point in coding that unless the solution is known.