4

Is there a way to prevent PyTables from printing out Closing remaining open files:path/to/store.h5...done?

I want to get rid of it just because it is clogging up the terminal.

I'm using pandas.HDFStore if that matters.

Ty Pavicich
  • 1,050
  • 3
  • 9
  • 24

2 Answers2

5

Closing it manually with:

store.close()

after its use will not output the message.

vonPetrushev
  • 5,457
  • 6
  • 39
  • 51
0

You really have to close the open store manually. There is no other way.

Why? PyTables uses a file registry to track open files. A destructor for this file registry is registered with Python's atexit module, which is called when the Python interpreter exits. If this destructor method is called, it will print out the names of every open file. This feature is not configurable.

user1504
  • 295
  • 1
  • 3
  • 9