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

Rhodri James rhodri at kynesim.co.uk
Wed Nov 6 06:42:33 EST 2019


On 06/11/2019 09:51, Spencer Du wrote:
> On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James  wrote:
>> On 05/11/2019 18:33, Spencer Du wrote:
>>> I want to execute at least two python files at once when imported but
>>> I dont know how to do this. Currently I can only import each file one
>>> after another but what i want is each file to be imported at the same
>>> time.
>>
>> That is a very odd requirement.  Why would you want to do this?  What
>> exactly does "at the same time" mean here?
>>
> These are modules/files which are independent of each other and have no dependencies with one another. Because of this I want to run modules all at once.
> 

"All at once" still isn't a very meaningful phrase.  If you want to 
import modules in parallel, don't.  Not only is it hard work to do, it 
will come back and bite you.

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-list mailing list