From: Ivan V. i B. <iv...@ca...> - 2004-09-29 17:58:00
|
On Wed, Sep 29, 2004 at 01:51:32PM +0200, Francesc Alted wrote: > A Dimecres 29 Setembre 2004 11:57, vareu escriure: > [...] > > Maybe there is another way to go? My intention is to have one script th= at=20 > > opens an existing hdf5 datafile or creates it from scratch if it does n= ot=20 > > exist and then starts a lengthy calculation saving the current state ev= ery=20 > > few minutes. Usually, the script would never finish but run indefinitel= y=20 > > until interrupted by Ctrl-C (therefore close() is never called) > >=20 > > Another script would run interactively in parallel (maybe even on anoth= er=20 > > machine) reading the current state from disk and evaluating the data. >=20 > I do think so. At least there should be someone in the pytables users list > that are using pytables for doing similar things. > [...] Anyway, I would suggest enclosing the loop in a =E2=80=9Ctry=E2=80=9D= clause to try and catch the KeyboardInterrupt exception, or maybe use a =E2=80=9Cfinally=E2=80=9C clause to close the file in any situation. Bye! --=20 Ivan Vilata i Balaguer @ =C2=A1Banda ancha asequible para Espa=C3=B1a ya!= @ http://www.selidor.net/ @ http://www.petitiononline.com/prot1/ @ |