def end(self): """End the experiment""" try: self._log.flush() os.fsync(self._log) self._log.close() except: pass sampler.close_sound(self) canvas.close_display(self)
def end(self): """End the experiment""" try: self.log.close() except: pass sampler.close_sound(self) canvas.close_display(self)
def end(self): """Nicely ends the experiment.""" from openexp import sampler, canvas self.running = False try: self._log.flush() os.fsync(self._log) self._log.close() except: pass sampler.close_sound(self) canvas.close_display(self) self.cleanup()
def end(self): """Gracefully end the experiment""" from openexp import sampler, canvas try: self._log.flush() os.fsync(self._log) self._log.close() except: pass sampler.close_sound(self) canvas.close_display(self)
def end(self): """Nicely ends the experiment.""" from openexp import sampler, canvas self.running = False try: self._log.flush() os.fsync(self._log) self._log.close() except: pass sampler.close_sound(self) canvas.close_display(self) self.cleanup() if not gc.isenabled(): print('experiment.end(): enabling garbage collection') gc.enable()
def end(self): """Nicely ends the experiment.""" from openexp import sampler, canvas self.running = False try: self._log.close() except AttributeError: print('experiment.end(): missing or invalid log object') sampler.close_sound(self) canvas.close_display(self) self.cleanup() if not gc.isenabled(): print('experiment.end(): enabling garbage collection') gc.enable() self.transmit_workspace(__finished__=True)