From: Anthony S. <sc...@gm...> - 2012-10-12 15:26:22
|
On Fri, Oct 12, 2012 at 8:47 AM, Aquil H. Abdullah <aqu...@gm... > wrote: > I have a process that uses PyTabels and opens a bunch of HDF5 files in > read-only mode. I know that if I don't close these files that AtExit hook > will close the open files and display the message: > > "Closing remaining open files:" > > My question is simple is it possible for me to run into any corruption > issues by not explicitly closing files that have been opened in read-only > mode? > Hello Aquil, I don't think that you will have any issues with doing this. However, I would just go ahead and close all of the files anyway. The 'with' statement is great for that. Also, recall line 2 of the Zen of Python: "Explicit is better than implicit." Be Well Anthony > > -- > Aquil H. Abdullah > "I never think of the future. It comes soon enough" - Albert Einstein > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Pytables-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pytables-users > > |