Program chaining on Windows

Chris Angelico rosuav at gmail.com
Mon Aug 24 04:20:56 EDT 2020


On Mon, Aug 24, 2020 at 5:30 PM Rob Cliffe <rob.cliffe at btinternet.com> wrote:
>
> On 24/08/2020 00:57, Chris Angelico wrote:
> > 2) The same thing but entirely within Python. Instead of importing
> > modules, manually load them and exec the source code. (No relation to
> > the process-level exec - I'm talking about the exec function.)
> > Updating is way WAY faster, but it isn't the same thing as restarting.
> > Your code has to be built with this in mind.
> Ah, there's the rub.  This program will be run stand-alone at client
> sites and I need to test it "as is".  As I see it I can't responsibly
> rewrite the way it works (if I'm understanding you more or less correctly).

Yeah, makes sense. If you'd built it from the ground up to handle fast
code reloads, the client site wouldn't know or care about that
difference, and you wouldn't lose much performance (probably not lose
any at all, in fact), but recoding it to that model now would possibly
be a big change, so it's not really worth it.

Stick to what you have, I think. It's better than trying to exec.

ChrisA


More information about the Python-list mailing list