[IPython-dev] automatic quoting in interactive shell
briford.wylie at gmail.com
Tue Jul 22 18:30:02 EDT 2014
Okay, the transformer approach worked amazingly well. It's a bit of a hack
the transformer simply adds a ',' to the beginning of lines where I'm
calling commands that need to be 'auto-quoted'.. but certainly speaks well
of the IPython design that my hack worked so quickly. :)
Again I just guessed on using the transformer approach, I might also dive
into doing a custom completer just for fun... so let me know if you
guys/gals have alternative suggestions.
Cheers.. keep up the great work..!
On Tue, Jul 22, 2014 at 3:54 PM, Brian Wylie <briford.wylie at gmail.com>
> When you say you don't want to extend the functionality of autocall.. I'm
> assuming you mean you don't want to put in a flag for the option as the
> functionality is already there.
> So extending the functionality will be a good learning exercise for me...
> so I'll probably do it this way unless someone else has a better suggestion.
> 1) Make a simple 'transformer'
> 2) register_transformer(my_trans)
> 3) sort_transformers()
> Seem like a reasonable approach? My dev experience with IPython is a few
> days old.. so any guidance is appreciated :)
> On Tue, Jul 22, 2014 at 2:31 PM, Thomas Kluyver <takowl at gmail.com> wrote:
>> On 22 July 2014 12:59, Brian Wylie <briford.wylie at gmail.com> wrote:
>>> the thing that I can't find is how to turn on 'automatic quoting' by
>>> default (see below)... it works if I put a comma at the beginning of the
>>> line but obviously you don't want to require users to do/know that..
>> I don't think that's a feature we have, and I don't think we especially
>> want to extend the functionality of autocall - it was disabled by default
>> because it's too liable to confuse people new to Python. If you want to do
>> it yourself as an extension, I think this is the best place to start
>> looking at the code:
>> IPython-dev mailing list
>> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev