MantisBT - ParaView
View Issue Details
0005957ParaView(No Category)public2007-10-25 13:342009-05-13 13:59
Robert Maynard 
Berk Geveci 
normalminoralways
closedfixed 
 
3.43.4 
0005957: Python Servermanager Slice problems
print view.Representations[:]
Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "/home/rmaynard/ProjParaview/trunk/build/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 432, in __getslice__
    raise exceptions.IndexError
IndexError

by python standards that should return all the items in the list.
No tags attached.
? CustomServermanager.py (68,780) 2007-10-31 15:33
https://www.vtk.org/Bug/file/6210/CustomServermanager.py
Issue History
2007-10-25 13:34Robert MaynardNew Issue
2007-10-31 12:24Robert MaynardNote Added: 0009592
2007-10-31 15:33Robert MaynardNote Added: 0009596
2007-10-31 15:33Robert MaynardNote Edited: 0009596
2007-10-31 15:33Robert MaynardFile Added: CustomServermanager.py
2008-04-07 19:02Ken MorelandStatusbacklog => tabled
2008-04-07 19:02Ken MorelandAssigned To => Berk Geveci
2008-04-07 19:02Ken MorelandNote Added: 0011138
2008-04-07 19:02Ken MorelandCategory => 3.4
2008-08-14 08:38Berk GeveciNote Added: 0013007
2008-08-14 08:38Berk GeveciStatustabled => @20@
2008-09-23 11:16Berk GeveciStatus@20@ => closed
2008-09-23 11:16Berk GeveciNote Added: 0013556
2008-09-23 11:16Berk GeveciResolutionopen => fixed
2009-05-13 13:58Utkarsh AyachitTarget Version => 3.4
2009-05-13 13:59Utkarsh AyachitFixed in Version => 3.4
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0009592)
Robert Maynard   
2007-10-31 12:24   
Code to replicate this problem:
 view = servermanager.GetRenderView()
 print view.Representations[:]
(0009596)
Robert Maynard   
2007-10-31 15:33   
Here is a servermanager file that has the proper way of doing slices / gets and dels. This uses the __getItem__ and slice objects that was introduced in 2.0. This will allow people to easily use [:] or [:-1] style slicing / gets

Edit: See upload for the file

(0011138)
Ken Moreland   
2008-04-07 19:02   
I have not tried this patch, but if it works, why not put it in 3.4?
(0013007)
Berk Geveci   
2008-08-14 08:38   
Waiting for feedback on my version of the patch from Robert and Utkarsh.
(0013556)
Berk Geveci   
2008-09-23 11:16   
Committed a modified version of the patch.