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

Ed Kellett edk141 at gmail.com
Fri Jan 9 01:13:13 CET 2015

On Fri Jan 09 2015 at 12:00:20 AM Russell Stewart <
Russell.S.Stewart at gmail.com> wrote:
> Running things in a separated environment is definitely the way to go.
> This is especially true when you are doing auto-importing or tab
> completion. I would run pythonpy with python -E if only I could figure out
> how to force pip to install it that way.
Oops... 'environment' was my shorter way of saying global and local

> Exception handling/printing is an obvious area for improvement with
> pythonpy. As I said above, I don't think the --i command panned out very
> well, and it isn't necessary. Likewise, it's not clear that
> your --no-exception-handling flag is necessary either.
It's for debugging spy itself (I think the documentation says something to
that effect), because the exception handling removes frames that belong to
spy from the traceback. I wouldn't include this in a standard tool, and
I'll probably remove it from spy when I decide to commit to a
not-development version.

> Also, I'm not sure why you have multiple arguments for different pipes,
> when you could do that just as well with spy '3' | spy 'pipe * 2'. Simple
> tools that are composable is the unix way.
Because passing Python objects to the next things is often helpful,
especially given the lack of pre- or post-command or built-in json
processing (you're expected to achieve the same end by piping your
objects). In fact, generalizing the three things above was how the piping
idea came about in the first place.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150109/6c497f57/attachment-0001.html>

More information about the Python-ideas mailing list