Thomas Bennett wrote at 2008-9-9 13:12 -0400:
using python 2.4.5 Zope 2.11.1-final DirectoryStorage 1.1.19
First, is there a more preferable product to use to serve files, mostly PDF, from the file system with Zope?
I suspect lock_file.py has changed since the DirectoryStorage product was last updated.
I followed instructions on http://dirstorage.sourceforge.net/install.html to install DirectoryStorage. I got to step 11. "Start Zope" and at the end of Traceback 1 (see below) File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py", line 12, in ? from ZODB.lock_file import lock_file ImportError: cannot import name lock_file
There are no classes or methods named lock_file in lock_file.py so I changed the import statement in PosixFilesystem.py to from ZODB import lock_file
The interface changed a bit. Now, it is assumed that "LockFile" is used (and "close" to release the lock). It is probably very simple to adapt "DirectoryStorage" correspondingly. -- Dieter