How execute at least two python files at once when imported?

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Nov 8 06:40:57 EST 2019


Cameron Simpson wrote:
> I was unsure as to how serialised this was: just the import data 
> structures or the whole source-of-the-module.

It's the whole source. I found that out the hard way once -- I had
a thread that imported a module whose main code ran an event processing
loop. It stopped any other threads from running, since the import
statement never finished.

-- 
Greg



More information about the Python-list mailing list