[Zope] Iowa Python Users Group - First Meeting

2008-09-09 Thread Mike Driscoll
Hi,

I'm not sure how many people on this list are Iowans, but I thought you guys 
(and girls) would like to know the following:

The first meeting date for the Iowa Python Users Group has been decided. Here 
are the details:



Time / Date:  Wednesday, Sept. 24 from 7-9 p.m.

Location:  
Marshall County Sheriff's Office, 3rd floor
2369 Jessup Ave
Marshalltown, IA 50158

Unofficial website: http://www.ipug.pythonlibrary.org



Don't know how to get there? Check out maps.yahoo.com or maps.google.com. The 
Sheriff's Office is not actually in Marshalltown. If you take Highway 30 East, 
towards Marshalltown you'll see it on your left. There's a large water tower 
there and the building is a rusty red color. There are some signs for a Tractor 
convention there as well. If you're coming from the other direction, then skip 
ALL the exits and keep driving until the lanes go from 4 lanes to 2. It should 
be the second right after that.

I am still developing the agenda for our first meeting, but here are some of 
the things we're going to discuss:

- What day really works best for meeting? (if you can't make the first one, you 
can email me your votes!)
- Figure out what domain name our group should have
- Decide on what Python web framework to use to create said site (which will be 
a group project)
- Try to come up with what format we want our meetings to take.

Plone and Zope users are welcome. In fact, anyone who is interested in Python 
(regardless of their experience with it) is welcome to come. Let your Iowan 
Python friends know.

Questions or ideas? Send them to me. Thanks!

Mike Driscoll
Applications Specialist
MCIS - Technology Center
1 E. Main St. 
Marshalltown, IA 50158
[EMAIL PROTECTED]
641-844-2802
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How do I write to a text file from Python?

2008-09-09 Thread Dieter Maurer
Jakob Schou Jensen wrote at 2008-9-9 08:27 +0200:
>Where is the 'manage_upload' function documented?

In the source ("OFS.Image.File.manage_upload").

def manage_upload(self,file='',REQUEST=None):
"""
Replaces the current contents of the File or Image object with file.

The file or images contents are replaced with the contents of 'file'.
"""

You are right when you point out:

  Why does the integrated online help documents (the private) "update_data"
  but not (the official) "manage_upload"?

I do not know.


I know that "manage_upload" is "official" because it has an
associated permission (and because it is used in the ZMI).


If you use "DocFinder" (or even "DocFinderTab"), then you can
easily see which methods are available in the various contexts.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] DirectoryStorage product - zope won't start

2008-09-09 Thread Thomas Bennett
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

Then the same thing occured in BaseDirectoryStorage.py and I made the same 
change to that import statement. (see Traceback 2)

Now (see Traceback 3) I get   File 
"/usr/local/lib/python2.4/site-packages/DirectoryStorage/LocalFilesystem.py", 
line 55, in engage
raise DirectoryStorageError('Storage is locked by another process')
DirectoryStorage.utils.DirectoryStorageError: Storage is locked by another 
process

But I'm not sure how to overcome this or is this because the locK_file problem 
but I suspect so. I can't find anything 
that indicates Storage is locked except for the end of that traceback.

I don't know if I need to do " from ZODB.lock_file import _lock_file " or 
something else.

Any help would be appreciated.

Thanks,

Thomas



==
Traceback 1
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:16:16 INFO ZServer HTTP server started at Tue Sep  9 12:16:16 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:16:17 INFO Zope Set effective user to "effective_user_here"
^[[ATraceback (most recent call last):
  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
  File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
  File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in 
getDatabase
db = factory.open(name, self.databases)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
  File "/opt/zope/lib/python/ZODB/config.py", line 97, in open
storage = section.storage.open()
  File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py", 
line 5, in open
from DirectoryStorage.Storage import Storage
  File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py", 
line 1, in ?
from Filesystem import Filesystem
  File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Filesystem.py", 
line 9, in ?
from PosixFilesystem import PosixFilesystem as Filesystem
  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

===
Traceback 2
[EMAIL PROTECTED] bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:43:22 INFO ZServer HTTP server started at Tue Sep  9 12:43:22 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:43:22 INFO Zope Set effective user to "effective_user_here"
Traceback (most recent call last):
  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
  File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
  File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
  File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
  File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in 
getDatabase
db = factory.open(name, self.databases)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
  File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
  File "/opt/zope/lib/python/ZODB/conf

[Zope] Doubt in using UserTrack product?

2008-09-09 Thread Rupesh P Raj
Hi,

I am a new to Zope. In my Zope application I want to integrate UserTrack
product, to track the logged in users. I placed the UserTrack folder inside
the Products directory, and created an instance of UserTrack inside some of
the other zope products, as follows:

u = UserTrack()
logger(str(u.listUserActivities()))

But the list is coming as empty. I think the place where I have initialised
the UserTrack instance is wrong.

In the Readme file which comes along with UserTrack says that, UserTrack
lists the currently active authenticated users that are logged into zope and
accesses an object below the folder where the UserTrack instance resides. So
I guess I need to write initialize in some of the ZMI folder object, but
which one?. Can anyone please help me.

Thanks
Roopesh
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )