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 |
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() |
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 |
|
|
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 |
|
|