[IPython-User] Specifying prompt for qtconsole at command line

Min RK benjaminrk@gmail....
Sat Aug 6 11:29:47 CDT 2011


Command-line args are prefixed with '--', so you want:
% ipython-qtconsole --IPythonWidget.in_prompt='xxx> '

There are zero options in IPython that cannot be set from the command-line.

Note that this particular prompt won't work of you are using 0.11 and not trunk, because the released version doesn't allow prompts that don't have '%i' for the prompt number. This has been fixed.

-MinRK

On Aug 6, 2011, at 7:51, Arlindo da Silva <dasilva@alum.mit.edu> wrote:

> On Fri, Aug 5, 2011 at 9:49 PM, Min RK <benjaminrk@gmail.com> wrote:
> 
> 
> On Aug 5, 2011, at 18:42, Fernando Perez <fperez.net@gmail.com> wrote:
> 
> > Hi Arlindo,
> >
> > On Fri, Aug 5, 2011 at 6:27 PM, Arlindo da Silva <dasilva@alum.mit.edu> wrote:
> >> Hi,
> >>   Which property should I set at the qtconsole command line for redefining
> >> my prompt? That is, what is the equivalent of
> >> % ipython TerminalInteractiveShell.prompt_in1='xxx> '
> >> On Mac OS X 10.7 (Lion) with EPD 7.1-1, this produces no effect:
> >> % ipython-qtconsole ZMQInteractiveShell.prompt_in1='xxx> '
> >> while
> >> % ipython-qtconsole IPythonWidget.in_prompt='xxxx> '
> >> crashes the qtconsole.
> >
> > No, unfortunately the Qt console right now has no support for prompt
> > configuration, they are hardcoded.  We ran out of time for
> > implementing prompt declaration in the messaging protocol, so it's
> > still in the todo list, sorry about that.
> 
> Not true, it's c.IPythonWidget.in_prompt
> 
> Look in ipython_qtconsole_config.py  generated by `ipython profile create` for the options available.
> 
> The same information can be seen with `ipython qtconsole --help-all`.
> 
> 
> Yes,  I am able to redefine the prompt by editing ipython_qtconsole_config.py as you suggest. I was hopping I could do that from the command with something like:
> 
> % ipython-qtconsole IPythonWidget.in_prompt='xxx> '
> 
> but this produces no effect. (I am writing a command line wrapper that I was hoping would not require any dedicated config.)
> 
>   Thanks,
> 
>      Arlindo
>  
> -- 
> Arlindo da Silva
> dasilva@alum.mit.edu
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110806/aba69ed1/attachment-0001.html 


More information about the IPython-User mailing list