[Python-ideas] Better comand line version of python -c

Ed Kellett edk141 at gmail.com
Fri Jan 9 07:10:28 CET 2015


On Fri Jan 09 2015 at 5:47:02 AM Andrew Barnert
<abarnert at yahoo.com.dmarc.invalid> wrote:

> On Thursday, January 8, 2015 9:02 PM, Russell Stewart <
> Russell.S.Stewart at gmail.com> wrote:
>
> And I'm even _more_ convinced that I'd like a shortcut for sys.stdin as an
> iterator rather than as a list (and for iterators to be printed line by
> line as lists are, but lazily--except that I think you already _do_ that,
> even though the docs say otherwise); it's easy to stall the `-l` pipeline
> with a huge input, which other Unix tools don't have a problem with.
>

spy's handling of multiline inputs might suit you better, although in this
case it doesn't seem like a characteristic of the interface as much as an
implementation detail.

On a completely different note, do you have any specific thoughts about how
the daemon mode is going to work? I considered it for spy, but getting it
exactly right is non-trivial:
- Multiple users on the same system should definitely work
- Different pythons or different virtualenvs under the same user should work
- Where should the daemon's stdout go?
- If `_` is present, what will happen when you inevitably end up working on
two things at once in different terminals?
- If this requires any manual help from the user, we've lost. It's not
convenient enough

Ed Kellett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150109/cd381ba2/attachment.html>


More information about the Python-ideas mailing list