/[ascend]/trunk/pygtk/integratorreporter.py
ViewVC logotype

Diff of /trunk/pygtk/integratorreporter.py

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

revision 848 by johnpye, Wed Jun 21 07:00:45 2006 UTC revision 849 by johnpye, Mon Sep 18 15:10:48 2006 UTC
# Line 6  import time Line 6  import time
6  from varentry import *  from varentry import *
7  from preferences import *  from preferences import *
8    
9    import observer
10    
11  # When writing this class, we assume that the integrator class has already had  # When writing this class, we assume that the integrator class has already had
12  # its "analyse" method called, so we know all that stuff like the number of  # its "analyse" method called, so we know all that stuff like the number of
13  # observed variables, what our time samples are, what the independent variable  # observed variables, what our time samples are, what the independent variable
# Line 37  class IntegratorReporterPython(ascpy.Int Line 39  class IntegratorReporterPython(ascpy.Int
39          self.data=[]          self.data=[]
40          self.nsteps = self.getIntegrator().getNumSteps()          self.nsteps = self.getIntegrator().getNumSteps()
41          self.progress.set_text("Starting...")          self.progress.set_text("Starting...")
42          self.progress.set_fraction(0.0);          self.progress.set_fraction(0.0)
43          #update the GUI          #update the GUI
44          while gtk.events_pending():          while gtk.events_pending():
45              gtk.main_iteration()              gtk.main_iteration()
# Line 45  class IntegratorReporterPython(ascpy.Int Line 47  class IntegratorReporterPython(ascpy.Int
47    
48      def closeOutput(self):      def closeOutput(self):
49          # output the results (to the console, for now)          # output the results (to the console, for now)
50          for _k,_v in self.data:          for _t,_vals in self.data:
51              print _k,_v              print _t,_vals
52    
53          self.progress.set_fraction(1.0);          self.progress.set_fraction(1.0)
54          self.progress.set_text("Finished.")          self.progress.set_text("Finished.")
55          return 1          return 1
56    
# Line 77  class IntegratorReporterPython(ascpy.Int Line 79  class IntegratorReporterPython(ascpy.Int
79              print "\n\nERROR IN RECORDOBSERVEDVALUES!",str(e)              print "\n\nERROR IN RECORDOBSERVEDVALUES!",str(e)
80              return 0              return 0
81          return 1          return 1
82    
83    class IntegratorReporterPyGTK(IntegratorReporterPython):
84        def __init__(self,browser,integrator):
85            IntegratorReporter.__init__(self,browser,integrator)
86    
87        

Legend:
Removed from v.848  
changed lines
  Added in v.849

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22