##// END OF EJS Templates
Backport PR #5458: Add support for PyQt5....
Backport PR #5458: Add support for PyQt5. This PR adds the new `QT_API_PYQT5` to `IPython/external/qt_loaders.py ` and allows to embed the IPython console in Qt5 Applications. In case of PyQt5, the loader returns a union of `PyQt5.QtGui` and `PyQt5.QtWidgets` acting as a Qt4-QtGui compatibility module. One small fix to `InProcessChannel.__init__` was necessary though. For some reason, when constructing `QtInProcessShellChannel`, the `QtCore.QObject.__init__` initializer from `SuperQObject` indirectly calls the `InProcessChannel.__init__` function, which doesn't have a default constructor and thus fails. I assume this has something to do with the metaclass/multiple inheritance approach IPython uses on QObject. Adding a default value for `client` in `InProcessChannel.__init__` solved the problem for me.

File last commit:

r13933:5a8a8ea9
r18784:3b30bb89
Show More
slides.py
43 lines | 1.3 KiB | text/x-python | PythonLexer
MinRK
add raw_format to Exporter classes...
r13664 """HTML slide show Exporter class"""
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
Paul Ivanov
replace 'transformer' with 'preprocessor'
r12219 from IPython.nbconvert import preprocessors
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 from IPython.config import Config
MinRK
add raw_format to Exporter classes...
r13664 from .html import HTMLExporter
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
#-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
MinRK
add raw_format to Exporter classes...
r13664 class SlidesExporter(HTMLExporter):
"""Exports HTML slides with reveal.js"""
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
Thomas Kluyver
Remove magic for loading templates from module names
r13925 def _file_extension_default(self):
return 'slides.html'
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
Thomas Kluyver
Remove magic for loading templates from module names
r13925 def _template_file_default(self):
return 'slides_reveal'
Thomas Kluyver
Add MIME types to nbconvert exporters
r13830
Thomas Kluyver
Remove magic for loading templates from module names
r13925 output_mimetype = 'text/html'
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
@property
def default_config(self):
c = Config({
MinRK
add raw_format to Exporter classes...
r13664 'RevealHelpPreprocessor': {
'enabled': True,
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 },
})
c.merge(super(SlidesExporter,self).default_config)
return c