[Python-ideas] A better interactive prompt

Paul Moore p.f.moore at gmail.com
Wed Oct 26 17:48:19 EDT 2016


On 26 October 2016 at 22:40, Nikolaus Rath <Nikolaus at rath.org> wrote:
> It also imposes a significant burden on scripting. I often have elements
> like this in shell scripts:
>
> output=$(python <<EOF
> import h5py
> with h5py.File('foo', 'r') as fh:
>      print((fh['bla'] * fh['com']).sum())
> EOF
> )
>
> If this now starts up IPython, it'll be *significantly* slower.

Good point. We could, of course, detect when stdin is non-interactive,
but at that point the code is starting to get unreasonably complex, as
well as having way too many special cases. So I agree, that probably
kills the proposal.

Paul


More information about the Python-ideas mailing list