tvtk conflict with compiz

March 6, 2009

I tried the following simple tvtk example but it kept hang my ubuntu 8.10 machine.

#!/usr/bin/env python

from enthought.tvtk.api import tvtk
cs=tvtk.ConeSource(resolution=100)
mapper=tvtk.PolyDataMapper(input=cs.output)
actor=tvtk.Actor(mapper=mapper)
#create a renderer:
renderer=tvtk.Renderer()
# create a render window and hand it the renderer
render_window = tvtk.RenderWindow(size=(400,400))
render_window.add_renderer(renderer)

#dreate interactor and hand it the render window
# this handles mouse interaction with window
interactor=tvtk.RenderWindowInteractor(render_window=render_window)
renderer.add_actor(actor)
interactor.initialize()
interactor.start()

It turns out that compiz is the trouble maker.  The script will work if I switch back to metacity. This can be done by pressing ALT-F2 and then typing

 metacity --replace

Just a side note, the code should be run in ipython with option -wthread.

Entry Filed under: About computer. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2009
M T W T F S S
« Feb   May »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Most Recent Posts