From: Fernando P. <fpe...@gm...> - 2009-09-17 03:49:00
|
Howdy, this fixes the ipython console sphinx extension to mark up output prompts as well. Mind if I put it in? Thanks, f maqroll[sphinxext]> diff -u ipython_console_highlighting.py ~/research/papers/nitime/sphinxext/ipython_console_highlighting.py --- ipython_console_highlighting.py 2009-08-26 00:03:06.000000000 -0700 +++ /home/fperez/research/papers/nitime/sphinxext/ipython_console_highlighting.py 2009-09-11 18:03:19.000000000 -0700 @@ -77,8 +77,11 @@ [(0, Generic.Prompt, continue_prompt.group())])) curcode += line[continue_prompt.end():] elif output_prompt is not None: + # Use the 'error' token for output. We should probably make + # our own token, but error is typicaly in a bright color like + # red, so it works fine for our Output prompts. insertions.append((len(curcode), - [(0, Generic.Output, output_prompt.group())])) + [(0, Generic.Error, output_prompt.group())])) curcode += line[output_prompt.end():] else: if curcode: |
From: Michael D. <md...@st...> - 2009-09-17 14:30:54
|
Looks fine to me. We were offering to commit this to matplotlib, or should I? Mike Fernando Perez wrote: > Howdy, > > this fixes the ipython console sphinx extension to mark up output > prompts as well. Mind if I put it in? > > Thanks, > > f > > maqroll[sphinxext]> diff -u ipython_console_highlighting.py > ~/research/papers/nitime/sphinxext/ipython_console_highlighting.py > --- ipython_console_highlighting.py 2009-08-26 00:03:06.000000000 -0700 > +++ /home/fperez/research/papers/nitime/sphinxext/ipython_console_highlighting.py 2009-09-11 > 18:03:19.000000000 -0700 > @@ -77,8 +77,11 @@ > [(0, Generic.Prompt, > continue_prompt.group())])) > curcode += line[continue_prompt.end():] > elif output_prompt is not None: > + # Use the 'error' token for output. We should probably make > + # our own token, but error is typicaly in a bright color like > + # red, so it works fine for our Output prompts. > insertions.append((len(curcode), > - [(0, Generic.Output, > output_prompt.group())])) > + [(0, Generic.Error, > output_prompt.group())])) > curcode += line[output_prompt.end():] > else: > if curcode: > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: John H. <jd...@gm...> - 2009-09-17 14:36:17
|
On Thu, Sep 17, 2009 at 9:30 AM, Michael Droettboom <md...@st...> wrote: > Looks fine to me. We were offering to commit this to matplotlib, or > should I? You should let Fernando, so he can survive the annual purge of developers no longer committing :-) |
From: Fernando P. <fpe...@gm...> - 2009-09-17 18:02:14
|
2009/9/17 John Hunter <jd...@gm...>: > On Thu, Sep 17, 2009 at 9:30 AM, Michael Droettboom <md...@st...> wrote: >> Looks fine to me. We were offering to commit this to matplotlib, or >> should I? > > You should let Fernando, so he can survive the annual purge of > developers no longer committing :-) Thanks :) I'll take care of it later then, I'll try to fix a warning we're seeing as well because it lacks a setup.py. Cheers, f |
From: Fernando P. <fpe...@gm...> - 2009-09-20 17:06:46
|
On Thu, Sep 17, 2009 at 11:02 AM, Fernando Perez <fpe...@gm...> wrote: > Thanks :) I'll take care of it later then, I'll try to fix a warning > we're seeing as well because it lacks a setup.py. > Done. I also committed the update to sampledoc, with a note in the log to eventually remove it once it's 'enough' in the wild in mpl. Cheers, f |