On Thu, Nov 14 2019, Floris Bruynooghe wrote:

> Hi,
>
> Thanks for carrying on with this!
>
> I'm a little confused with how to follow this, is the current state of
> the code somewhere in a repo/branch where I can try things out and make
> changes from?

In git://notmuchmail.org/git/notmuch David has ref origin/wip/cffi
which contains related changes -- You can fetch the code while waiting
for more collaboration instructions from David.

> On Tue 05 Nov 2019 at 22:22 -0400, David Bremner wrote:
>
>> Tomi Ollila <tomi.oll...@iki.fi> writes:
>>
>>
>>> alternative:
>>>
>>>        ...
>>>        print('Invoking: {}'.format(' '.join(cmd)))
>>>         
>>>        def preexec_fn(): os.environ['NOTMUCH_CONFIG'] = str(cfg_fname) 
>>>
>>>        proc = subprocess.run(cmd, timeout=5, preexec_fn=preexec_fn)
>>>        ...
>>>
>>> The unix fork ... (here preexec_fn called in child) ... exec model is
>>> superior to any other alternative ! =D
>>
>> I don't consider myself a good judge of python style, so I'll defer to
>> Floris on that one.
>
> I'd have gone with what David wrote to be fair, mostly because it's
> pretty simple to see what's going on where for the preexec_fn I'd have
> to look at the docs.  Not sure if this has much to do with Python style
> though, more with how much you like Unix tricks.

Yes, the simple approach taken (by env copy) is fine. It is also good to
know these powerful alternatives that may be useful elsewhere =D

>
>
> Cheers,
> Floris

Tomi

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to