DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

在测试中使用对象持久化


对象的保存:

import shelve

testdb = shelve.open('e:\bvtdb')

testdb['bvt'] = bvt

testdb.close()

提取对象:

import shelve

db = shelve.open('e:\bvtdb')

bvt = db['bvt']

builder = ReportBuilder(bvt)



Published

Apr 20, 2011

Last Updated

Apr 20, 2011

Category

Tech

Tags

  • 测试 3
  • 持久化 1
  • Python 136

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor