enthought / pyface

pyface: traits-capable windowing framework
Other
106 stars 55 forks source link

Broken IPython example #1

Open GaelVaroquaux opened 13 years ago

GaelVaroquaux commented 13 years ago

It seems like the IPython widget is implemented in neither backends. Or is this because I have the wrong version of IPython? In which case the error message is not terribly informative.

parietal ~/dev/enthought/ets/pyface/examples $ python ipython_shell.py
Traceback (most recent call last):
  File "ipython_shell.py", line 51, in 
    window.open()
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/i_window.py", line 145, in open
    self._create()
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/ui/wx/application_window.py", line 150, in _create
    contents = self._create_contents(body)
  File "ipython_shell.py", line 39, in _create_contents
    self._shell = IPythonWidget(parent)
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/toolkit.py", line 92, in __init__
    raise NotImplementedError("the %s pyface backend doesn't implement %s" % (ETSConfig.toolkit, oname))
NotImplementedError: the wx pyface backend doesn't implement IPythonWidget
parietal ~/dev/enthought/ets/pyface/examples $ export ETS_TOOLKIT=qt4
parietal ~/dev/enthought/ets/pyface/examples $ python ipython_shell.py
Traceback (most recent call last):
  File "ipython_shell.py", line 51, in 
    window.open()
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/i_window.py", line 145, in open
    self._create()
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/ui/qt4/application_window.py", line 123, in _create
    contents = self._create_contents(self.control)
  File "ipython_shell.py", line 39, in _create_contents
    self._shell = IPythonWidget(parent)
  File "/home/varoquau/dev/enthought/ets/pyface/pyface/toolkit.py", line 92, in __init__
    raise NotImplementedError("the %s pyface backend doesn't implement %s" % (ETSConfig.toolkit, oname))
NotImplementedError: the qt4 pyface backend doesn't implement IPythonWidget
epatters commented 13 years ago

If any exception occurs when importing a backend implementation, Pyface simply says that it isn't implemented. This is extremely annoying and maybe one day I or someone else will fix it. In the meantime, you can comment out the appropriate lines in toolkit.py to see what is actually the problem.

But I wouldn't be surprised if this code has become broken. Unfortunately, I don't have time to investigate right now.