From: J. V. B. <jev...@tu...> - 2008-06-14 22:23:23
|
I'm trying to use shelve in a small Jython program, but every time I try to run it, I get an error message: "TypeError: open() got an unexpected keyword argument 'writeback'" Here's my code: #---- begin -------# #! c:\jython2.2.1\jython.jar import os, sys, shelve shelfpath = sys.path[0] print print "Path to the shelf directory:", shelfpath print path = ('%s''\\''%s''.''db') % (shelfpath, 'accounts_database') print print "This is the path to the shelf:" , path file = shelve.open(path, 'c', writeback=True) print file #---- end --------# My configuration: Windows Vista Eclipse 3.3.2 Jython2.2.1 Python2.5.2 jdk1.5.0_12 Jython, Python and Java JRE all set up to run in Eclipse. I'm trying to run this program in Eclipse. Why doesn't the "writeback" argument work? Thanks in advance for any help |