Could you try running this test script with pvpython like this:<br><br>$ cat test.py<br>from paraview.simple import *<br>f = ProgrammableSource()<br>f.Script = 'print "something"'<br>f.UpdatePipeline()<br>
<br><br>$ /Applications/paraview.app/Contents/bin/pvpython test.py<br>something<br><br>Does that work?<br><br>Pat<br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 11:02 AM, Colin McAuliffe <span dir="ltr"><<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can get the path for the main script but not for the programmable filter because of the import error.<br>
<br>
There is<br>
<br>
/Applications/ParaView.app/<u></u>Contents/Python<br>
/Applications/ParaView.app/<u></u>Contents/Libraries<br>
/Applications/ParaView.app/<u></u>Contents/bin<br>
<br>
in the path for the main script. Is there anything missing?<br>
<br>
Quoting Pat Marion <<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
I forgot to cc the mailing list.<br>
<br>
On Tue, Feb 26, 2013 at 8:42 AM, Pat Marion <<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
The programmable filter will run in the same process, using the same<br>
python, as the main script. But, it's possible something is not working<br>
right with the paths. I would put a print statement in both the main<br>
script and in the programmable filter's script to "import sys; print<br>
sys.path" and make sure that in both cases the correct paths are being<br>
used. At least one entry in the path should list the folder that contains<br>
the paraview python module directory (the paraview directory that contains<br>
__init__.py).<br>
<br>
Pat<br>
<br>
<br>
On Tue, Feb 26, 2013 at 3:08 AM, Colin McAuliffe <<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a>>wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello all,<br>
<br>
I am trying to use the programmable filter in a python script, but it is<br>
not able to find the paraview module.<br>
<br>
the code:<br>
<br>
ProgrammableFilter1 = ProgrammableFilter()<br>
<br>
ProgrammableFilter1.Script = 'print "something"'<br>
<br>
Show()<br>
<br>
<br>
gives the error:<br>
<br>
Traceback (most recent call last):<br>
File "<string>", line 1, in <module><br>
ImportError: No module named paraview<br>
<br>
since I run all my scripts with pvpython, the path should be set up<br>
properly, but I am wondering if ProgrammableFilter is invoking a different<br>
version of python?<br>
<br>
Thanks<br>
Colin<br>
<br>
<br>
--<br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br></div></div>
______________________________<u></u>**_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/**" target="_blank">http://www.kitware.com/**</a><br>
opensource/opensource.html<<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">htt<u></u>p://www.kitware.com/<u></u>opensource/opensource.html</a>><div class="im"><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at:<br>
</div><a href="http://paraview.org/Wiki/**ParaView" target="_blank">http://paraview.org/Wiki/**<u></u>ParaView</a> <<a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>ParaView</a>><div class="im">
<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
</div><a href="http://www.paraview.org/**mailman/listinfo/paraview" target="_blank">http://www.paraview.org/**<u></u>mailman/listinfo/paraview</a><<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http<u></u>://www.paraview.org/mailman/<u></u>listinfo/paraview</a>><br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
<br>
-- <br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br>
</div></div></blockquote></div><br>