[Python-ideas] Option of running shell/console commands inside the REPL
Steven D'Aprano
steve at pearwood.info
Fri Feb 1 21:50:00 EST 2019
On Fri, Feb 01, 2019 at 04:15:06PM -0500, Terry Reedy wrote:
> For repeated use within and between sessions, put 'from os import system
> as oss' in a startup file. Then one only needs "oss('dir')". Note that
> 'dir' only works on Windows; the unix equivalent is 'ls'.
Actually, on some Unix/Linux systems, ``dir`` is either an alias to
``ls``, or a similar but separate executable:
[steve at ando ~]$ which dir
/usr/bin/dir
(TIL that dir can be a seperate executable... I was convinced it was
only an alias until I tried it just now.)
--
Steve
More information about the Python-ideas
mailing list