[vtkusers] running python from the interpreter

Eduardo Suarez eduardo at ctm.ulpgc.es
Tue Mar 1 07:03:45 EST 2005


I have seen the changes in QVTKRenderWindowInteractor.py and it works 
much better. However,

[otto:python_itk_vtk/ 510]$ python
Python 2.3.5 (#2, Feb  9 2005, 00:38:15)
[GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import QVTKRenderWindowInteractor
 >>> QVTKRenderWindowInteractor.QVTKRenderWidgetConeExample()

When i press 'q', the windows freezes and the interpreter is released. 
But the windows is still there. Is this the normal behavior? If i kill 
the window, the interpreter dies.

On the other hand, isn't there changes to vtkRenderWindow?

Thanks a lot for your help,
-Eduardo

Mathieu Malaterre wrote:
> Eduardo,
> 
>     The problem of "X connection to :0.0 broken (explicit kill or server 
> shutdown)." was only very recenlty fixed in VTK CVS. But you should be 
> albe to exit properly your app pressing q or Q. All example using 
> wxWidget, tk, Qt or GTK works this way.
> 
>     Have a look within :
> 
> - VTK/Wrapping/Python/vtk/qt
> - VTK/Wrapping/Python/vtk/tk
> - VTK/Wrapping/Python/vtk/wx
> - VTK/Wrapping/Python/vtk/gtk
> 
> HTH
> Mathieu
> 
> Eduardo Suarez wrote:
> 
>> I would like to know if it is possible to run from python a 
>> renderwindow example, and then to run it again. Or just to run it and 
>> then exit without breaking. I have tried but i get next error
>>
>> [otto:python_itk_vtk/ 513]$ python
>> Python 2.3.5 (#2, Feb  9 2005, 00:38:15)
>> [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>  >>> import RenderWithVtk
>>
>> [works ok, but when i click close windows (q key does not work)...]
>>
>> X connection to :0.0 broken (explicit kill or server shutdown).
>> [otto:python_itk_vtk/ 514]$
>>
>> Thanks a lot,
>> -Eduardo



More information about the vtkusers mailing list