From: John H. <jo...@ne...> - 2001-03-13 05:53:48
|
All, The following script runs in python, but not jython: import shelve subd = { "hula":"hoop", "sevenof":9 } d = shelve.open( "dictfile" ) d["hoop"] = "skirt" d["polo"] = "pony" d["subber"] = subd d.close() d = shelve.open( "dictfile" ) print d["subber"] This is the output from the jython run: jython.bat shelvetest.py Traceback (innermost last): File "shelvetest.py", line 4, in ? File "e:\Jython\Lib\shelve.py", line 157, in open File "e:\Jython\Lib\shelve.py", line 147, in __init__ File "e:\Jython\Lib\anydbm.py", line 71, in open ImportError: no module named whichdb whichdb.py is not in the the jython distribution so I borrowed the one from python. That eventually led to other problems (which I omit here). What is the best strategy for getting shelve to work? Thanks (again) John |