[Python-ideas] install pip packages from Python prompt

Antoine Pitrou solipsis at pitrou.net
Mon Oct 30 12:29:01 EDT 2017


On Tue, 31 Oct 2017 02:22:50 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 31 October 2017 at 02:06, Paul Moore <p.f.moore at gmail.com> wrote:
> 
> > On 30 October 2017 at 15:53, Antoine Pitrou <solipsis at pitrou.net> wrote:  
> > > On Tue, 31 Oct 2017 01:44:10 +1000
> > > Nick Coghlan <ncoghlan at gmail.com> wrote:  
> > >> (We'd want a real process restart, rather than emulating it by calling
> > >> Py_Initialize & Py_Finalize multiple times, as not every module properly
> > >> supports multiple initialise/finalise cycles within a single process,  
> > and  
> > >> module-specific quirks are exactly what we'd be trying to avoid by  
> > forcing  
> > >> an interpreter restart)  
> > >
> > > The main difference, though, is that a notebook will reload and
> > > replay all your session, while restarting the regular REPL will simply
> > > lose all current work.  I think that makes the idea much less
> > > appealing.  
> >  
> 
> Right, but if you want an installation to work reliably, you're going to
> lose that state anyway.

You're going to lose the concrete state, but not the sequence of prompt
commands and expressions which led to that state, and which a notebook
makes trivial to replay (it's a bit like statement-based replication on
a database). The regular REPL would lose both.

Regards

Antoine.




More information about the Python-ideas mailing list