0

I'm trying to add object-persistence to my python app. I'm currently using python 3.4 on windows.

The only module I found useful was shelve but on windows, it appears, it creates three different files rather than one: 'db.bak' ,'db.dat' and 'db.dir'. How can I force shelve to create only single file ? furthermore , whenever I need to open that db on read-only mode , 'db.dir' is being edited for some reason.

Does anyone know how to fix those issues ? or maybe suggest other modules that would work considering the OS and python version?

Felk
  • 7,720
  • 2
  • 35
  • 65
  • What issue do you want to solve? Maybe sqlite3 would be appropriate for you. – gukoff Nov 09 '17 at 11:35
  • The read-only issue. sqlite3 wont be a fit for me as I want that db file to be dictionary oriented and serializable so I could send it over network etc. – Daniel Levi Nov 09 '17 at 12:13
  • Do you require concurrent reads from different processes? – Felk Nov 09 '17 at 12:24
  • Yes , when I tried to read-only the 'db.dir' file into my script it actually got changed meaning there wont be concurrent reading. – Daniel Levi Nov 09 '17 at 12:30
  • In addition it would very helpful if there was any way to create only a single file instead of 3 – Daniel Levi Nov 09 '17 at 12:33

0 Answers0