[IPython-User] Document ipython embedding in Qt

Thomas Kluyver takowl@gmail....
Tue Sep 3 13:56:15 CDT 2013


On 2 September 2013 11:01, Antony Lee <antony.lee@berkeley.edu> wrote:

> Also, I had to figure out how to load a profile configuration (create an
> IPythonQtConsoleApp instance, set the config_file_{path,files} attributes
> properly and call load_config_file, then use e.g. init_colors?) by browsing
> the source.
>

If you're configuring it from your application code, you don't need to load
a separate config file - you can create a Config instance, set attributes
on it, and pass it in when you instantiate the Qt console. Something like
this:

from IPython.config.loader import Config
c = Config()
c.IPythonQtConsoleApp.hide_menubar = True
qtcapp = IPythonQtConsoleApp(config=c)

You can also set these attributes on the objects after instantiating them,
although not all of them take effect as soon as they're set:

console_widget.font_size = 14


> Given that the main example is already there, what about improving it with
> configuration loading, and adding a link to it in the official docs?  (I
> would be happy to do so.)'
>

Docs improvements are always welcome. Docs are in the main repo, and you
can make a pull request just like any other. Start with the link, and then
think about the best example to give of configuration - I suspect that
loading a config file is suboptimal, although I don't know exactly what
your needs are.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130903/864cd7a4/attachment.html 


More information about the IPython-User mailing list