[Python-ideas] Option of running shell/console commands inside the REPL

Oleg Broytman phd at phdru.name
Sat Feb 2 20:52:31 EST 2019


On Sat, Feb 02, 2019 at 07:37:56PM -0500, Terry Reedy <tjreedy at udel.edu> wrote:
> On 2/2/2019 8:13 AM, Oleg Broytman wrote:
> > > IDLE does this.
> > 
> >     For the question "Does Python REPL need more batteries?" is your
> > answer "No, just point people to IDLE"?
> 
> If one want these batteries *today*, that is one sane answer, especially on
> Windows and, it seems so far, Mac.
> 
> >     If it is - well, I disagree. I implemented a lot of enhancements for
> > REPL myself, and I don't like and avoid GUI programs.
> 
> Whereas, in spite of (or perhaps because of) possibly being older than you,

   Oh, "my beard is longer than your" game! :-))) I'm 51 y.o. But I
always was like that. When all sane people were switching from DOS to
Windows 3.0 I switched to Unix. First, BSD/OS, later SunOS, later
FreeBSD, after that Linux, Linux, Linux. At DOS times I was writing huge
.bat-files using all possible tools I can collect in pre-Internet era.
Small utilities, alternative command line interpreters (4DOS), .bat
compilers (turbobat). I tolerated TUI but hated GUI even then.
   Switching to shell scripting was pretty natural for me with
awk/find/grep/sed/etc replacing all those tools.

> Anti-GUI attitudes make Python harder to use for many people.  Pip, for
> instance, desperately needs a GUI front end.

   For me it's hard to believe ``pip`` needs any UI. I run ``pip`` in
command line, in scripts and at remote servers, often completely
unattended (Travis CI and AppVeyor, e.g.) I don't see how I'd use an UI.

> I believe that PIP problems
> are the most common Python question on StackOverflow.

   Problems - yes. But not because it lacks an UI. I read SO every day
for a few years now and answer questions every few days. I don't
remember people ever asked about any UI for pip. pip problems, as far as
I can recollect the problems, are:

* SSL; recently pypi.org and github.com switched to TLS1.2-only
  and the change broke a lot of sites where people still run
  CentOS 5 and other old Python versions without any possibility
  of upgrading.
* A few pythons at the host: run ``pip install module``,
  ``import module``, got ``ImportError/NoModuleFoundError`` because
  ``pip`` and ``import`` are ran with 2 different pythons.
* Incompatible upgrades: ``pip`` was upgraded but the user didn't get
  that it was ``/usr/bin/pip`` that was upgraded and
  ``/usr/local/bin/pip`` is now outdated but is found first in
  ``$PATH``. Hence the error ``AttributeError: main``.
* The absence of a compiler on Windows (or a wrong version of it)
  to install a C extension without a binary wheel.
* Offline installation. Downloading binary wheels for a different
  platform (different from the host where ``pip`` is running).

> -- 
> Terry Jan Reedy

Oleg.
-- 
    Oleg Broytman            https://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list