[Grok-dev] Re: access to the parts directory

Martijn Faassen faassen at startifact.com
Fri Apr 25 11:20:51 EDT 2008


Fernando Correa Neto wrote:
> Hey Joachim,
> 
> On Fri, Apr 25, 2008 at 3:26 AM, Joachim Schmitz <js at aixtraware.de> wrote:
> 
>>  I want to have access to subdirectories of my installation, so that my
>> application can read from or write to them. For example for mass-import of
>> userdata.
> 
> Once upon a time, there was a Zope3 branch that would address the
> zipimport issue but I am not sure how it ended.
> I am not telling you what to do, but since I don't know any 3rd party
> product to help you with that, try to play nicelly with your model's
> __file__ and __path__ attributes and you'll probably come up with
> something that will solve your problem.
> But try to do it with security so you don't mess up with your
> installation and application. If you ask Grok to kill itself, grok you
> do exactly what you asking for, so....be carefull.
> 
> Does anyone know something that can deal with file system from zope?

I'm not sure I understand.

Python's 'open()' is a good way to deal with the filesystem from Zope. :)

What I'd do is designate some directory on the system as the directory 
to import from, perhaps hardcoded in code, or perhaps configurable in 
the UI (though one needs to be very careful with that from a security 
perspective).

For mass import you could also upload a zip file and have the 
application go through that.

Regards,

Martijn



More information about the Grok-dev mailing list