[issue23551] IDLE to provide menu link to PIP gui.

Terry J. Reedy report at bugs.python.org
Sat Jun 25 16:32:46 EDT 2016


Terry J. Reedy added the comment:

Starting with June 20 msg268947 of #27051, Ned Deily raised the issue of adding something to the stdlib that depends on an external interface.  Nick Coughlin agreed that this is problematical.  Pipgui might have to be installed into site-packages from PyPI.

Once pipgui is installed on somewhere on the path, it does not matter where, as IDLE will use some variant of '<current-executable> -m pipgui'.  The issue is getting it installed *somewhere*.

Module mainmenu (Bindings in 3.5) uses the following code to conditionally add 'Turtle Demo' to the IDLE menu.

from importlib.util import find_spec
menudefs = ...
if find_spec('turtledemo'):
    menudefs[-1][1].append(('Turtle Demo', '<<open-turtle-demo>>'))

I believe the issue is that some Linux distributions either do or might make installing turtle-turtledemo a separate option from Tkinter and IDLE, so that IDLE might be installed but turtledemo not.  If turtledemo is not present, there is nothing for IDLE to do.

If pipgui is pip-installable, the same condition could be used , but in the menu event handler. When "if find_spec('pip') and not find_spec('pipgui')" is true, IDLE could offer to run 'python -m pip install pipgui' in a subprocess.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23551>
_______________________________________


More information about the Python-bugs-list mailing list