[Zope] Within Zope equivalent of open() function.

AM list_subscriber@neurobs.com
Wed, 06 Nov 2002 13:12:45 -0800


Hi,
I ran into that kind of problem where I wanted my users to be able to 
edit files. A simple solution (could get dangerous if you dont set it up 
properly) is to have two external methods that read and write to a given 
file in the file system and then provide a textarea based interface for 
editing it and saving it.

But please be warned, be "EXTREMELY" careful as to how you deal with 
which folder you give access to these methods to. The way I do it is 
preset the folder to and from which these methods read and write data 
and only pass the relative path as an argument.

Also these folders in the file systems should have the appropriate 
access rights for zope to be able to read and write to.

I am sure some other zopistas will be able to provide a neater solution, 
but this works for me and is quick and easy to implement.

HTH
AM

Alec Munro wrote:

> Hi all,
> I want to provide a web based interface to editing stylesheets. I want 
> these stylesheets to be contained within Zope. Is there something like 
> Python's open() function that I can use?
> Thanks,
>
> Alec Munro
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>

-- 
==================================================================
 Aseem Mohanty							   
 Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 
 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231		  	
==================================================================								  	
 "I saw `cout' being shifted "Hello world" times to the left and  
  stopped right there!!"                        -- Steve Gonedes  
==================================================================