<p dir="ltr"><br>
On Jul 8, 2014 4:22 AM, "Thomas Kluyver" <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>> wrote:<br>
><br>
> On 7 July 2014 04:12, Sjoerd de Vries <<a href="mailto:sjdv1982@gmail.com">sjdv1982@gmail.com</a>> wrote:<br>
>>>><br>
>>>> - A hook to change the %alias formatter class from DollarFormatter (to allow customized variable substitution)<br>
>>>> - A hook in FullEvalFormatter._vformat to be triggered on certain "conversion" values (for converters)<br>
>><br>
>>  <br>
>> What about these hooks, would they be OK? I can make a new branch with just this, it's a dozen lines or less. <br>
><br>
><br>
> 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.<br>

>  <br>
>>>><br>
>>>> - Additional optional arguments to interactiveshell methods "getoutput", "system_piped" and "system_raw" (for variable substitution and stderr capture)<br>
>>><br>
>>><br>
>>> 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.<br>

>><br>
>><br>
>> Well, I can copy-paste "getoutput" and "system_piped"  into my own extension and make the necessary changes there, if that's best.<br>
><br>
><br>
> 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.<br>

><br>
> Thanks,<br>
> Thomas<br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
OK, I will create a new branch with just the hooks and a few usage examples. In the process, I will test if a hook is really needed or if the same result can be obtained with subclasses within the extension.</p>
<p dir="ltr">Cheers</p>
<p dir="ltr">Sjoerd</p>