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 <[email protected]>
<http://bugs.python.org/issue23551>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com