[Paraview] Python Reader

2010-10-18 Thread Patrick . Brockmann
Hi, How to create a Reader using a Python script ? I would like to study the simplest example to do this ? For now I can create a Source that uses a Python ProgrammableFilter but I want to consider it as a Reader since I have a filename as entry. Thanks Patrick Brockmann _

Re: [Paraview] Python Reader

2010-10-18 Thread Adriano Gagliardi
October 2010 16:49 To: paraview@paraview.org Subject: [Paraview] Python Reader Hi, How to create a Reader using a Python script ? I would like to study the simplest example to do this ? For now I can create a Source that uses a Python ProgrammableFilter but I want to consider it as a Reader

Re: [Paraview] Python Reader

2010-10-18 Thread Brockmann Patrick
I'm assuming you want something more refined than: Programmable Filter: filename = 'myfilename' execfile(my_python_code.py) --- where filename is used within my_python_code as a variable? Yes, especially if you want to design a plugin where filename is an entry choosen by a user. I am loo

Re: [Paraview] Python Reader

2010-10-18 Thread Adriano Gagliardi
riginal Message- From: Brockmann Patrick [mailto:patrick.brockm...@cea.fr] Sent: 18 October 2010 18:04 To: paraview@paraview.org Cc: agaglia...@ara.co.uk Subject: Re: [Paraview] Python Reader > I'm assuming you want something more refined than: > > Programmable Filter: > >

Re: [Paraview] Python Reader

2010-10-19 Thread Paul Edwards
; Computational Aerodynamics > Aircraft Research Association Ltd. > Manton Lane > Bedford > > Tel: 01234 32 4644 > E-mail: agaglia...@ara.co.uk > Url: www.ara.co.uk > -Original Message- > From: Brockmann Patrick [mailto:patrick.brockm...@cea.fr] > Sent: 18 Octo

Re: [Paraview] Python Reader

2010-10-19 Thread Brockmann Patrick
Paul Edwards a écrit : Hi Patrick, Have you tried adding a StringVectorProperty to your XML for a filename (with ) and having a GUI XML file for adding a reader? I think someone suggested you look at the helix source xml (http://paraview.org/gitweb?p=ParaView.git;a=blob;f=Examples/Plugins/H

Re: [Paraview] Python Reader

2010-10-19 Thread Paul Edwards
You will need a separate xml file for the GUI plugin to tell paraview about the new format. Look at pqReader.xml in "Examples/Plugins/Reader". Regards, Paul On 19 October 2010 14:26, Brockmann Patrick wrote: > Paul Edwards a écrit : > > Hi Patrick, >> >> Have you tried adding a StringVectorPr

Re: [Paraview] Python Reader

2010-10-19 Thread Aurélien Marsan
In doing so, it seems that the reader must have a "SetFileName" function. How do you handle this with python ? Or can you avoid this ? I do not think the integration of a python script in the GUI can be as perfect as that of a reader writen in c++. 2010/10/19 Paul Edwards > You will need a sepa

Re: [Paraview] Python Reader

2010-10-19 Thread Paul Edwards
Are you trying to do this without compiling anything? I'm not even sure you can load in a GUI plugin via XML - maybe someone else can confirm here? Sorry I can't be more help, Paul On 19 October 2010 16:15, Brockmann Patrick wrote: > Paul Edwards a écrit : > > You will need a separate xml file