<div dir="ltr">Indeed, we have an implementation of this specific to mypy.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 11, 2018 at 11:34 AM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Yes, you don't want this to be a generic utility, rather a helper<br>
library that people can integrate into their command-line applications<br>
to enable such startup caching.<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine.<br>
</font></span><span class="im HOEnZb"><br>
<br>
On Fri, 11 May 2018 17:27:35 +0200<br>
Oleg Broytman <<a href="mailto:phd@phdru.name">phd@phdru.name</a>> wrote:<br>
> On Fri, May 11, 2018 at 07:38:05AM -0700, Chris Barker - NOAA Federal via Python-Dev <<a href="mailto:python-dev@python.org">python-dev@python.org</a>> wrote:<br>
> > Could one make a little startup utility that, when invoked the first<br>
> > time, starts up a raw python interpreter, keeps it running somewhere,<br>
> > and then forks it to run the actual python code.<br>
> > <br>
> > Then every invocation after that would make a new fork.  <br>
> <br>
>    Used to be implemented (and discussed in this list) many times. Just<br>
> a few examples:<br>
> <br>
> <a href="http://readyexec.sourceforge.net/" rel="noreferrer" target="_blank">http://readyexec.sourceforge.<wbr>net/</a><br>
> <a href="https://blogs.gnome.org/johan/2007/01/18/introducing-python-launcher/" rel="noreferrer" target="_blank">https://blogs.gnome.org/johan/<wbr>2007/01/18/introducing-python-<wbr>launcher/</a><br>
> <br>
>    Proven to be hard and never gain any traction.<br>
> <br>
> a) you don't want the daemon to import all possible modules so you need<br>
>    to run a separate copy of the daemon for every Python version, every<br>
>    user and every client program;<br>
> b) you need to find "your" daemon - using TCP? unix sockets? named pipes?<br>
> b) need to redirect stdio to/from the daemon;<br>
> c) need to redirect signals and exceptions;<br>
> d) have problems with elevated privileges (how do you elevate the daemon<br>
>    if the client was started with `sudo -H`?);<br>
> e) not portable (there is a popular GUI that cannot fork).<br>
> <br>
> > -CHB<br>
> > Sent from my iPhone  <br>
> <br>
> Oleg.<br>
<br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>guido%40python.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>