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

2019-11-08 Thread Gregory Ewing
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

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

2019-11-07 Thread Cameron Simpson
On 08Nov2019 00:52, Greg Ewing wrote: Cameron Simpson wrote: Spencer's modules run unconditional stuff in addition to defining classes. That may cause trouble. It will -- because of the import lock, they won't run simultaneously in the same process. I was unsure as to how serialised this

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

2019-11-07 Thread Gregory Ewing
Cameron Simpson wrote: Spencer's modules run unconditional stuff in addition to defining classes. That may cause trouble. It will -- because of the import lock, they won't run simultaneously in the same process. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

OT language barrier, was: How execute at least two python files at once when imported?

2019-11-07 Thread Christian Gollwitzer
Am 06.11.19 um 17:34 schrieb Igor Korot: On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in

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

2019-11-06 Thread Cameron Simpson
On 06Nov2019 08:16, Spencer Du wrote: Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in another post. Parallel imports can be fine. However,

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

2019-11-06 Thread Cameron Simpson
On 06Nov2019 18:15, Rhodri James wrote: On 06/11/2019 16:02, Spencer Du wrote: Why is importing modules in parallel bad? To put it as simply as I can: 1. The import mechanism is complicated, even the bits that are user-visible. Fiddling with it has a high chance of going wrong. 2.

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

2019-11-06 Thread Richard Damon
On 11/6/19 3:37 PM, Michael Torrie wrote: > On 11/6/19 9:16 AM, Spencer Du wrote: >> I just wanted a way to import at least two python files in parallel >> and I wanted to know how this can be done or a reason why its bad as >> stated in another post. > It's not "bad," but it's also not possible.

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

2019-11-06 Thread jfong
Igor Korot於 2019年11月7日星期四 UTC+8上午12時34分35秒寫道: > Hi, > > On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: > > > > Hi > > > > Sorry if I haven't stated my requirements clearly. > > > > I just wanted a way to import at least two python files in parallel and I > > wanted to know how this can be

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

2019-11-06 Thread Michael Torrie
On 11/6/19 9:16 AM, Spencer Du wrote: > I just wanted a way to import at least two python files in parallel > and I wanted to know how this can be done or a reason why its bad as > stated in another post. It's not "bad," but it's also not possible. Nor does it make sense. That's why so many

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

2019-11-06 Thread Bob van der Poel
On Wed, Nov 6, 2019 at 11:15 AM Rhodri James wrote: > On 06/11/2019 16:02, Spencer Du wrote: > > Why is importing modules in parallel bad? > > To put it as simply as I can: > > 1. The import mechanism is complicated, even the bits that are > user-visible. Fiddling with it has a high chance of

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

2019-11-06 Thread Rhodri James
On 06/11/2019 16:02, Spencer Du wrote: Why is importing modules in parallel bad? To put it as simply as I can: 1. The import mechanism is complicated, even the bits that are user-visible. Fiddling with it has a high chance of going wrong. 2. Multi-threading is less complicated than

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

2019-11-06 Thread David Raymond
"Why is importing modules in parallel bad?" In general I'd say that "import foo" is supposed to be there because you want the classes, functions, variables etc. in foo to be available in your current program. A module should never run a whole bunch of time consuming stuff when it's imported.

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

2019-11-06 Thread Igor Korot
Hi, On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: > > Hi > > Sorry if I haven't stated my requirements clearly. > > I just wanted a way to import at least two python files in parallel and I > wanted to know how this can be done or a reason why its bad as stated in > another post. This is

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

2019-11-06 Thread Karsten Hilbert
On Wed, Nov 06, 2019 at 08:16:07AM -0800, Spencer Du wrote: > Sorry if I haven't stated my requirements clearly. > > I just wanted a way to import at least two python files in parallel and I > wanted to know how this can be done or a reason why its bad as stated in > another post. You stated

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

2019-11-06 Thread Spencer Du
Hi Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in another post. Thanks Spencer -- https://mail.python.org/mailman/listinfo/python-list

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

2019-11-06 Thread Igor Korot
Hi, I think what you are trying is a "chicken-egg" problem. You should clearly state you requirements in order for us to help you. If you have a problem with English I'm sure there is some python-related list/forum in your native language. Just google it. Thank you. On Wed, Nov 6, 2019 at 10:07

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

2019-11-06 Thread Spencer Du
Why is importing modules in parallel bad? Thanks Spencer -- https://mail.python.org/mailman/listinfo/python-list

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

2019-11-06 Thread Antoon Pardon
On 5/11/19 19:33, Spencer Du wrote: > Hi > > 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. Can you help me > write the

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

2019-11-06 Thread Rhodri James
On 06/11/2019 11:42, Rhodri James wrote: 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

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

2019-11-06 Thread Rhodri James
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

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

2019-11-06 Thread Spencer Du
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

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

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:41:59 UTC+1, Bob Gailer wrote: > On Nov 5, 2019 1:35 PM, "Spencer Du" wrote: > > > > Hi > > > > 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

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

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 21:05:02 UTC+1, Terry Reedy wrote: > On 11/5/2019 1:33 PM, 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

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

2019-11-06 Thread Spencer Du
On Tuesday, 5 November 2019 19:37:32 UTC+1, Karsten Hilbert 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

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

2019-11-06 Thread Spencer Du
On Wednesday, 6 November 2019 09:05:42 UTC+1, Christian Gollwitzer wrote: > Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: > > On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du > > declaimed the following: > > > >> Hi > >> > >> I want to execute at least two python files at once when

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

2019-11-06 Thread Christian Gollwitzer
Am 06.11.19 um 03:59 schrieb Dennis Lee Bieber: On Tue, 5 Nov 2019 10:33:20 -0800 (PST), Spencer Du declaimed the following: Hi 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

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

2019-11-05 Thread Terry Reedy
On 11/5/2019 1:33 PM, 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. Can you help me write the code for

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

2019-11-05 Thread Rhodri James
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

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

2019-11-05 Thread Bob Gailer
On Nov 5, 2019 1:35 PM, "Spencer Du" wrote: > > Hi > > 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. Can you help me write the

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

2019-11-05 Thread Karsten Hilbert
> 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. Can you explain why that seems necessary ? Karsten --

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

2019-11-05 Thread Spencer Du
Hi 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. Can you help me write the code for this? embedded.py is the main file to