/[escript]/trunk/pyvisi/py_src/datacollector.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/datacollector.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1093 by jongui, Tue Apr 10 04:27:31 2007 UTC revision 1094 by jongui, Mon Apr 16 06:04:25 2007 UTC
# Line 69  class DataCollector: Line 69  class DataCollector:
69          """          """
70    
71          if(self.__source == Source.XML):          if(self.__source == Source.XML):
72              self.__vtk_xml_reader.SetFileName(file_name)              # Check whether the specified file exists, otherwise exit.
73                if not(os.access(file_name, os.F_OK)):
74                    print "\nERROR: '%s' file does NOT exists.\n" % file_name
75                    sys.exit(1)        
76    
77                self.__vtk_xml_reader.SetFileName(file_name)
78              # Update must be called after SetFileName to make the reader              # Update must be called after SetFileName to make the reader
79              # up-to-date. Otherwise, some output values may be incorrect.              # up-to-date. Otherwise, some output values may be incorrect.
80              self.__vtk_xml_reader.Update()              self.__vtk_xml_reader.Update()
# Line 94  class DataCollector: Line 98  class DataCollector:
98          """          """
99          Create data using the <name>=<data> pairing. Assumption is made          Create data using the <name>=<data> pairing. Assumption is made
100          that the data will be given in the appropriate format.          that the data will be given in the appropriate format.
   
         @bug: Reading source data directly from an escript object is NOT  
         work properly. Therefore this method should NOT be used at this  
         stage.  
101          """          """
102    
103          if self.__source == Source.ESCRIPT:          if self.__source == Source.ESCRIPT:
# Line 116  class DataCollector: Line 116  class DataCollector:
116              self.__vtk_xml_reader.Update()              self.__vtk_xml_reader.Update()
117              self.__output = self.__vtk_xml_reader.GetOutput()              self.__output = self.__vtk_xml_reader.GetOutput()
118              self.__get_attribute_lists()              self.__get_attribute_lists()
119    
120                if(self.__count > 0):
121                    self._updateRange()
122    
123                self.__count+=1
124          else:          else:
125              raise ValueError("Source type %s does not support 'setData'\n" \              raise ValueError("Source type %s does not support 'setData'\n" \
126                      % self.__source)                      % self.__source)

Legend:
Removed from v.1093  
changed lines
  Added in v.1094

  ViewVC Help
Powered by ViewVC 1.1.26