[IPython-dev] (no subject)

Sjoerd de Vries sjdv1982 at gmail.com
Tue Jul 8 04:25:50 EDT 2014


On Jul 8, 2014 4:22 AM, "Thomas Kluyver" <takowl at gmail.com> wrote:
>
> 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
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
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.

Cheers

Sjoerd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140708/eee6a1cd/attachment.html>


More information about the IPython-dev mailing list