[IPython-dev] Deprecating the IPython Color* API & IPython Theming
asmeurer at gmail.com
Tue Nov 10 11:25:07 EST 2015
On Tue, Nov 10, 2015 at 2:33 AM, Matthias Bussonnier
<bussonniermatthias at gmail.com> wrote:
> Hi Aaron,
>> On Nov 9, 2015, at 23:09, Aaron Meurer <asmeurer at gmail.com> wrote:
>> I hope you also take this opportunity to make it easier for people to
>> customize their prompts.
>> You have to go through some silly hoops
>> (which IIRC aren't really documented) to make the prompt execute some
>> code every time it is displayed, which is necessary to do things like
>> put the date or cwd in your prompt.
> Maybe not in the same PR, cwd and date should have custom markers
> to make that easier.
Those are bad examples then. Something that isn't built in but does
require re-execution at each prompt.
>> I also found it annoying that I
>> couldn't just inject something into some dictionary (I forget which at
>> this point) because in IPython's type system dictionaries are
>> immutable for some reason.
> Now that IPython can have dependencies, I things one can use Jinja2,
> or other templating library to simplify prompts.
>> I also want to say that I'm stoked that IPython is finally getting
>> proper theming support in the terminal.
> Well, I helped fixing a syntax highlighting bug, and slippery slope...
> this was not really on the roadmap...
> Might take some times to be released as is touch some pretty deep part of IPython though.
>> Aaron Meurer
>> On Tue, Nov 10, 2015 at 12:02 AM, Matthias Bussonnier
>> <bussonniermatthias at gmail.com> wrote:
>>> Hello list,
>>> Who is relying on IPython.utils.Pycolorize.Parser, and other ColorAnsi
>>> functionality ?
>>> I’m wondering if/how much deprecation time and backward compatibility is
>>> Are you using “Embed” in esoteric ways (like through pexpect/subprocess ?)
>>> Please speak now.
>>> Longer version
>>> Hi all, I’m working on refactoring all the ANSI code handling of IPython.
>>> Some code in here is more than a decade old, and have a lot a redundant
>>> code, which often now
>>> is available with a better API in libraries like Pygments.
>>> This part of the code also deals with prompt formatting Because yes you can
>>> put CWD,
>>> and date in IPython prompt if you like, and in color, and it is relatively
>>> annoying to keep compatibility with old and new API
>>> at the same time.
>>> So are any of you heavy users of the API in these region of the code base ?
>>> If so can you point me at your usage, so that I could make the migration to
>>> the new API
>>> easier in your use case ?
>>> Also if you are using IPython-embed through Expect or subprocess and alike,
>>> the new ASCII escape sequence
>>> might break previously made assumptions, I want to make sure these are not
>>> broken either.
>>> Thank you for reading me until the end, here is a gif of the potential
>>> new IPython themes as a reward.
>>>  https://github.com/ipython/ipython/pull/8966
>>>  well, mostly, the naming of ascii color is discutable.
>>>  It’s pronounced Jif not Gif:
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>> IPython-dev mailing list
>> IPython-dev at scipy.org
> IPython-dev mailing list
> IPython-dev at scipy.org
More information about the IPython-dev