Using python shelve cross-platform

别等时光非礼了梦想. 提交于 2019-12-03 06:07:40

Thank you for your reply!

I seems that shelves in python are not easily forced to use a specific db, however pickles works like a charm. At least from mac os -> windows 7.

So short answer: If you want portability, don't use shelves, use pickles directly.

/Esben

sqlite3 module is a cross platform module that is even supported by many other languages and tools.

pickle module is simpler, but also cross platform. You give it an object and it dumps it to a file. No tables or rows like sqlite.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!