On Mon, Aug 24, 2020 at 6:39 AM dn via Python-list <python-list@python.org> wrote: > > On 23/08/2020 19:31, Rob Cliffe via Python-list wrote: > > On WIndows 10, running Python programs in a DOS box, I would like one > > Python program to chain to another. I.e. the first program to be > > replaced by the second (*not* waiting for the second to finish, as with > > e.g. os.system). This doesn't seem a lot to ask, but so far I have been > > unable to so this. I am using Python 3.8.3. Some attempts so far (may > > be nonsensical): > > What is the definition of "finish" in the first program? > Not sure if have understood <<<(*not* waiting for the second to finish, > as with e.g. os.system)>>>. > In Python, the easiest way to chain two "modules" is to use import. This > gives full control to the 'import-er'. >
With exec, the intention is to *replace* the current program, not to invoke it and wait till it's done. The current program will not continue after a successful exec. ChrisA -- https://mail.python.org/mailman/listinfo/python-list