[IPython-dev] (no subject)

Thomas Kluyver takowl at gmail.com
Mon Jul 7 22:21:08 EDT 2014


On 7 July 2014 04:12, Sjoerd de Vries <sjdv1982 at gmail.com> wrote:

>  - A hook to change the %alias formatter class from DollarFormatter (to
>>> allow customized variable substitution)
>>> - A hook in FullEvalFormatter._vformat to be triggered on certain
>>> "conversion" values (for converters)
>>>
>>
> What about these hooks, would they be OK? I can make a new branch with
> just this, it's a dozen lines or less.
>

I guess I'm not entirely sure why we should add hooks from inside these
classes - isn't it easier for you to subclass and override the relevant
bits? We can look into breaking up the API if it makes sense, though.


>  - Additional optional arguments to interactiveshell methods "getoutput",
>>> "system_piped" and "system_raw" (for variable substitution and stderr
>>> capture)
>>>
>>
>> I think an argument for stderr capture makes sense. For controlling
>> variable substitution, it might be easier to go down a level, to the
>> (similarly named) functions which they call after doing var_expand.
>>
>
> Well, I can copy-paste "getoutput" and "system_piped"  into my own
> extension and make the necessary changes there, if that's best.
>

Let's brainstorm on APIs a bit, because I feel like we're swimming in
process control APIs - subprocess, pexpect, our own process machinery in
IPython.utils. It shouldn't be necessary to reinvent the wheel again.

Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140707/dede13ee/attachment.html>


More information about the IPython-dev mailing list