On 9/6/2015 4:57 AM, Russell Keith-Magee wrote:
On Sun, Sep 6, 2015 at 12:04 PM, Terry Reedy wrote:
On 9/5/2015 5:03 PM, Terry Reedy wrote:

I think a gui frontend is an even better idea. The tracker has a
proposal to make such, once written, available from Idle.
I was thinking that the gui code should be in pip itself and not
idlelib, so as to be available to any Python shell or IDE. If it covered
multiple PMs, then it might go somewhere in the stdlib.

Inspired by this thread, I did some experiments and am fairly confident that
pip.main can be imported and used directly, bypassing paths, subprocesses,
and pipes.
I can confirm that this is, indeed, possible. I use this exact
technique in my tool Briefcase to simplify the process of packaging
code as an app bundle.


There *is*, however, a potential gotcha suggested on the issue by Donald
Stufft and verified by me. pip is designed for one command (main call)
per invocation, not for repeated commands. When started, it finds and
caches a list of installed packages. The install command does not
update the cached list. So 'show new_or_upgraded_package' will not
work. Your series of installs do not run into this.

Terry Jan Reedy

Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2018 Grokbase