[IronPython] shelve bug?

Chip Norkus wd at teleri.net
Thu Mar 1 08:42:23 CET 2007


On Thu Mar 01, 2007; 02:39PM +0900, Stuart Midgley wrote:
> Afternoon
> 
> I am not sure if this has done the rounds previously, but shelves  
> don't appear to be fully supported on IronPython
> 
> My code (shelvebug.py) is

I believe that IP does not support pyd modules (that is DLLs for Python)
which is where the real support for dbm on Windows comes from.  As such
the shelve module can't currently be supported well (dumbdbm is not very
good. :))

Additionaly some mode flags to open() don't work quite right in IP1.0,
but I *think* they are fixed in the latest 1.1 (not sure...)

> 
> 
> import sys
> 
> sys.path.append("/opt/local/Library/Frameworks/Python.framework/ 
> Libraries/python2.4")
> 
> import shelve
> 
> d=shelve.open("aaa", writeback=True)
> d["a"] = 1
> d.close()
> 
> 
> and the output is
> 
> 
> stu:/IronPython-1.0.1 > mono -O=all ipy.exe shelvebug.py
> Traceback (most recent call last):
>    File shelvebug, line unknown, in Initialize
>    File shelve, line unknown, in __setitem__
>    File dumbdbm, line unknown, in __setitem__
>    File dumbdbm, line unknown, in _addval
> NotImplementedError: bad mode: rb+
> 
> 
> This obviously works just fine on my MacOSX system with python2.4.3
> 
> Stu.
> 
> 
> 
> --
> Dr Stuart Midgley
> sdm900 at gmail.com
> 
> 
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-chip
--
personal: chip norkus; irc: wd;                   wd at teleri.net
info:     finger wd at teleri.net for plan or keys;  http://telekinesis.org



More information about the Ironpython-users mailing list