[Paraview] Collaboration between "Python Shell" and "Programmable Source Python Script"

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue May 14 07:49:05 EDT 2013


This is not supported nor recommended. The two entitites work in
separate contexts. The code to fill up that array that you want to
pass may itself be moved to within the Programmable Source's Script
and that maybe a better approach.


Utkarsh

On Sun, May 12, 2013 at 7:43 AM, Сергей Дмитриев <allrond1992 at rambler.ru> wrote:
> Hello.
>
> I make the following data from the "Python Shell" in "Programmable Source"
>
> In the "Python Shell" I write the following:
>
> src=ProgrammableSource()
>
> src.add_attribute('MyArray',[1,2,3])
>
> Show()
>
> In the ProgrammableSource Script I write the following:
>
> array=self.MyArray
>
> print array
>
> ######
>
> Result:
>
> Traceback (most recent call last):
>
> File "<string>", line 24, in <module>
>
> File "<string>", line 2, in RequestData
>
> AttributeError: Array
>
> How to pass an array between the two interpreters?
>
> .
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list