Re: [Zope] LocalFS import error

2013-04-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/20/2013 02:38 PM, Babylakshmi wrote:
> Hi,
> 
> I am getting the following error while starting zope: Any help to fix
> this error is highly appreciated. Thanks, Babylakshmi
> 
> 2013-04-19 16:30:32 ERROR Zope Could not import Products.LocalFS 
> Traceback (most recent call last): File
> "/usr/local/zope/lib/python/OFS/Application.py", line 715, in 
> import_product product=__import__(pname, global_dict, global_dict,
> silly) File "/usr/local/zope/lib/python/Products/LocalFS/__init__.py",
> line 44, in ? import os, LocalFS File
> "/usr/local/zope/lib/python/Products/LocalFS/LocalFS.py", line 52, in
> ? from OFS.content_types import find_binary ImportError: cannot import
> name find_binary Traceback (most recent call last): File
> "/usr/local/zope/lib/python/Zope2/Startup/run.py", line 56, in ? 
> run() File "/usr/local/zope/lib/python/Zope2/Startup/run.py", line 21,
> in run starter.prepare() File
> "/usr/local/zope/lib/python/Zope2/Startup/__init__.py", line 98, in 
> prepare self.startZope() File
> "/usr/local/zope/lib/python/Zope2/Startup/__init__.py", line 257, in 
> startZope Zope2.startup() File
> "/usr/local/zope/lib/python/Zope2/__init__.py", line 47, in startup 
> _startup() File "/usr/local/zope/lib/python/Zope2/App/startup.py",
> line 46, in startup OFS.Application.import_products() File
> "/usr/local/zope/lib/python/OFS/Application.py", line 692, in 
> import_products import_product(product_dir, product_name,
> raise_exc=debug_mode) File
> "/usr/local/zope/lib/python/OFS/Application.py", line 730, in 
> import_product raise sys.exc_info() KeyError

Likely the version you have for LocalFS is not compatible with the
version of Zope.   See:

 http://www.joonis.de/content/LocalFSForZope213


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlFy/XEACgkQ+gerLs4ltQ4MAACgnfiWC9DceQgmXgH0tMeeVleP
aP0AoIyOe3H1SybpTnDR7qnL0KDh6JRK
=DjgW
-END PGP SIGNATURE-

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


Re: [Zope] LocalFS

2009-04-11 Thread Chris Withers
Jürgen Herrmann wrote:
>  - localfs, as discussed which needed a few minor tweaks to keep it
>running. i did them myself, primarily because i wanted to keep
>going on immediately and i didn't want to look or even wait for
>a fixed version. it wasn't rocket science to make those corrections
>to the code, so no maintenance nightmare in sight here.

Given that so many of you seem to be doing this, why not one of you 
actually pick up the patches, apply them, release a version and maintain 
it until you no longer need LocalFS?

All this independent patching seems a little insane...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
___
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] LocalFS unsupported and doesn't work without patching...

2009-04-02 Thread Chris Withers
Andrew Milton wrote:
> | > I am fine with the current situation (with respect to "LocalFS",
> | > not with respect to "Zope")...
> | 
> | Then you're part of the Zope problem ;-)
> 
> As opposed to random deprecation and removal of interfaces that causes
> otherwise working code to break ?

Heh, Zope 2 has died a death of a thousand cuts.

Plohn was a pretty big slice in that ;-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
___
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] LocalFS unsupported and doesn't work without patching...

2009-04-02 Thread Andrew Milton
+---[ Chris Withers ]--
| Dieter Maurer wrote:
| > Chris Withers wrote at 2009-4-2 20:24 +0100:
| >> Dieter Maurer wrote:
| >>> I am very happy about stable packages because I often extend them.
| >>>
| >>> For example, I have extended "LocalFS" to allow configuration of
| >>> its instances via environment variables. This allows us to synchronize
| >>> our ZODBs in the test and development environments with the production
| >>> environment (helpful to perform tests and resolve issues) even though
| >>> the file system layout is different.
| >> Then why not pick it up, release it and support it, since no-one else is 
| >> doing so? ;-)
| > 
| > I am fine with the current situation (with respect to "LocalFS",
| > not with respect to "Zope")...
| 
| Then you're part of the Zope problem ;-)

As opposed to random deprecation and removal of interfaces that causes
otherwise working code to break ?

-- 
Andrew Milton
a...@theinternet.com.au
___
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] LocalFS unsupported and doesn't work without patching...

2009-04-02 Thread Chris Withers
Dieter Maurer wrote:
> Chris Withers wrote at 2009-4-2 20:24 +0100:
>> Dieter Maurer wrote:
>>> I am very happy about stable packages because I often extend them.
>>>
>>> For example, I have extended "LocalFS" to allow configuration of
>>> its instances via environment variables. This allows us to synchronize
>>> our ZODBs in the test and development environments with the production
>>> environment (helpful to perform tests and resolve issues) even though
>>> the file system layout is different.
>> Then why not pick it up, release it and support it, since no-one else is 
>> doing so? ;-)
> 
> I am fine with the current situation (with respect to "LocalFS",
> not with respect to "Zope")...

Then you're part of the Zope problem ;-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
___
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] LocalFS unsupported and doesn't work without patching...

2009-04-02 Thread Dieter Maurer
Chris Withers wrote at 2009-4-2 20:24 +0100:
>Dieter Maurer wrote:
>> I am very happy about stable packages because I often extend them.
>> 
>> For example, I have extended "LocalFS" to allow configuration of
>> its instances via environment variables. This allows us to synchronize
>> our ZODBs in the test and development environments with the production
>> environment (helpful to perform tests and resolve issues) even though
>> the file system layout is different.
>
>Then why not pick it up, release it and support it, since no-one else is 
>doing so? ;-)

I am fine with the current situation (with respect to "LocalFS",
not with respect to "Zope")...



-- 
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 )


Re: [Zope] LocalFS - user needs to be manager?

2006-09-22 Thread Josh Burvill
Hello again,
 
Update - the problem is not experienced with localfs-andreas-1.3
 
That is my solution for now.
 
Thanks, Josh 
On 21/09/06, Jonathan <[EMAIL PROTECTED]> wrote:
 


Try turning on verbose security in zope.conf  - there are two settings that you need:
 
security-policy-implementation pythonverbose-security on
 
 
 
Jonathan
 
 


- Original Message - 
From: Josh Burvill 

To: David H 
Cc: zope@zope.org 
Sent: Wednesday, September 20, 2006 10:04 PM
Subject: Re: [Zope] LocalFS - user needs to be manager?
 
On 21/09/06, David H <[EMAIL PROTECTED] 
> wrote: 
Josh Burvill wrote:> Hi all,>> I am experiencing an odd situation where if a user does not have 
> manager role, he/she cannot browse a localfs object.>> I think it can't be a filesystem permissions or zope process os user > problem because if the zope user has the manager role, there is no 
> problem.>> I can't see anything in the permissions for the localfs object to> cause a problem, they are all on "acquire". >> Any hints?>> Zope 2.8.6-final
 , python 2.3.5, win32> LocalFS-1-7-andreas>JoshDid you do an Zope upgrade recently?  Why do you say its "odd" what wasnormal before? DavidI upgraded my zope from 
2.6.4 a couple months ago, but only installed localfs yesterday.Being new to localfs, I don't really know if it is odd or normal, but it seems "odd".The unprivileged (but "authenticated") zope user is asked to reenter their login details (basic http auth) when they try to click on the link to the localfs object, and not allowed to view it. But if i grant the user the zope "Manager" role, they are let in. 
Hope this clarifies the problem. 



___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 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] LocalFS - user needs to be manager?

2006-09-20 Thread Jonathan



Try turning on verbose security in 
zope.conf  - there are two settings that you need:
 
security-policy-implementation 
pythonverbose-security on
 
 
 
Jonathan
 
 

  - Original Message - 
  From: 
  Josh Burvill 
  
  To: David H 
  Cc: zope@zope.org 
  Sent: Wednesday, September 20, 2006 10:04 
  PM
  Subject: Re: [Zope] LocalFS - user needs 
  to be manager?
  
  On 21/09/06, David 
  H <[EMAIL PROTECTED]> 
  wrote:
  Josh 
Burvill wrote:> Hi all,>> I am experiencing an odd 
situation where if a user does not have> manager role, he/she cannot 
browse a localfs object.>> I think it can't be a filesystem 
permissions or zope process os user > problem because if the zope 
user has the manager role, there is no> problem.>> I 
can't see anything in the permissions for the localfs object to> 
cause a problem, they are all on "acquire". >> Any 
hints?>> Zope 2.8.6-final, python 2.3.5, win32> 
LocalFS-1-7-andreas>JoshDid you do an Zope upgrade 
recently?  Why do you say its "odd" what wasnormal before? 
DavidI upgraded my zope from 2.6.4 a couple 
  months ago, but only installed localfs yesterday.Being new to localfs, I 
  don't really know if it is odd or normal, but it seems "odd".The 
  unprivileged (but "authenticated") zope user is asked to reenter their login 
  details (basic http auth) when they try to click on the link to the localfs 
  object, and not allowed to view it. But if i grant the user the zope "Manager" 
  role, they are let in.Hope this clarifies the problem. 
  
  

  ___Zope maillist  
  -  
  Zope@zope.orghttp://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 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] LocalFS - user needs to be manager?

2006-09-20 Thread Josh Burvill
On 21/09/06, David H <[EMAIL PROTECTED]> wrote:
Josh Burvill wrote:> Hi all,>> I am experiencing an odd situation where if a user does not have> manager role, he/she cannot browse a localfs object.>> I think it can't be a filesystem permissions or zope process os user
> problem because if the zope user has the manager role, there is no> problem.>> I can't see anything in the permissions for the localfs object to> cause a problem, they are all on "acquire".
>> Any hints?>> Zope 2.8.6-final, python 2.3.5, win32> LocalFS-1-7-andreas>JoshDid you do an Zope upgrade recently?  Why do you say its "odd" what wasnormal before?
DavidI upgraded my zope from 2.6.4 a couple months ago, but only installed localfs yesterday.
Being new to localfs, I don't really know if it is odd or normal, but it seems "odd".
The unprivileged (but "authenticated") zope user is asked to reenter
their login details (basic http auth) when they try to click on the
link to the localfs object, and not allowed to view it. But if i grant the user the zope "Manager"
role, they are let in.

Hope this clarifies the problem.
___
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] LocalFS - user needs to be manager?

2006-09-20 Thread David H

Josh Burvill wrote:


Hi all,

I am experiencing an odd situation where if a user does not have 
manager role, he/she cannot browse a localfs object.


I think it can't be a filesystem permissions or zope process os user 
problem because if the zope user has the manager role, there is no 
problem.


I can't see anything in the permissions for the localfs object to 
cause a problem, they are all on "acquire".


Any hints?

Zope 2.8.6-final, python 2.3.5, win32
LocalFS-1-7-andreas


Josh
Did you do an Zope upgrade recently?  Why do you say its "odd" what was 
normal before?


David

___
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] LocalFS/Zope CGI Question

2006-08-09 Thread Dieter Maurer
beno wrote at 2006-8-9 13:42 -0400:
> ...
>My plan is to avoid installing extra and otherwise unnecessary s/w. I 
>don't need Apache for anything else. If Zope is out, is it possible to 
>do this with Squid, do you know?

I do not know -- but I doubt it: Squid specialiazed on caching and almost
surely did not aim for Web server functionality.

-- 
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 )


Re: [Zope] LocalFS/Zope CGI Question

2006-08-09 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 9 Aug 2006, at 13:42, beno wrote:

It is Apache (or another Web Server) that might be ready to
call scripts via CGI. Zope won't

My plan is to avoid installing extra and otherwise unnecessary s/w.  
I don't need Apache for anything else. If Zope is out, is it  
possible to do this with Squid, do you know?


Squid does not execute CGI scripts, it is a *cache* server, not a web  
server.


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFE2iF5RAx5nvEhZLIRAhouAKCufKEj4vwtmLeTTRTJd6wYUfMXvACfQbsp
9rfw4y8NgssA9HDCuPEHfvo=
=GIco
-END PGP SIGNATURE-
___
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] LocalFS/Zope CGI Question

2006-08-09 Thread beno

Dieter Maurer wrote:

beno wrote at 2006-8-9 08:41 -0400:
  
I've added a LocalFS folder for my cgi-bin dir and also Zope CGI, but 
I'm not clear how to integrate these two so that I can access my Mailman 
and Vqadmin cgi scripts, which are on the legacy system.



I do not understand what you plan.

But I can tell you that Zope will do nothing (and need not do anything)
with Mailman or Vqadmin cgi scripts.

It is Apache (or another Web Server) that might be ready to
call scripts via CGI. Zope won't
  
My plan is to avoid installing extra and otherwise unnecessary s/w. I 
don't need Apache for anything else. If Zope is out, is it possible to 
do this with Squid, do you know?

___
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] LocalFS/Zope CGI Question

2006-08-09 Thread Dieter Maurer
beno wrote at 2006-8-9 08:41 -0400:
>I've added a LocalFS folder for my cgi-bin dir and also Zope CGI, but 
>I'm not clear how to integrate these two so that I can access my Mailman 
>and Vqadmin cgi scripts, which are on the legacy system.

I do not understand what you plan.

But I can tell you that Zope will do nothing (and need not do anything)
with Mailman or Vqadmin cgi scripts.

It is Apache (or another Web Server) that might be ready to
call scripts via CGI. Zope won't



-- 
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 )


Re: [Zope] LocalFS/Zope CGI Question

2006-08-09 Thread Andreas Jung



--On 9. August 2006 08:41:57 -0400 beno <[EMAIL PROTECTED]> wrote:


Hi;
I've added a LocalFS folder for my cgi-bin dir and also Zope CGI,


ZopeCGI is deprecated since ages and obsolete. The recommended way is to 
use

Apache  + RewriteRules.

-aj

pgp75f04G4mJ4.pgp
Description: PGP signature
___
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] LocalFS problems

2006-05-08 Thread Dieter Maurer
Dennis Allison wrote at 2006-5-7 19:21 -0700:
> ...
>The problem seems to be with the tpValues() program in the LocalFS product
>which returns an empty list.  The controlling flag,
>o.isPrincipiaFolderish, seems to be set to zero when it ought to have a
>value of 1 when the object being referenced is a LocalDirectory instance.  
>As a result, instead of returning a list of sub-directories it returns an 
>empty list. 

A good analysis. Thus, you change what is necessary to let
"tpValues" behave well ...

-- 
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 )


Re: [Zope] LocalFS problems

2006-05-08 Thread Dennis Allison

Or just do a custom tpValues equivalent for the particular special case.

I suspect that is what we will try next...   ;-)


On Mon, 8 May 2006, Chris Withers wrote:

> Dennis Allison wrote:
> > LocalFS product (1.3-andreas) seems to be having a problem with the
> >  tag in Zope 2.9.2/Python 2.4.2.  
> 
> Then don't use DTML, it does, after all suck (tm) ;-)
> 
> > The problem seems to be with the tpValues() program in the LocalFS product
> > which returns an empty list. 
> 
> then tpValues() is likely wrong for localfs, unless localfs doesn't want 
> to play ball with the tree tag. Given that the tree tag is used by the 
> zmi, and you don't really want to display potentially millions of 
> sub-objects in the zmi, it might be perfectly legitimate for local-fs to 
> do what it's doing...
> 
> > There seems to be some trickery going on with the isPrincipiaFolderish 
> > and the tree_view attributes, but I don't quite get what's supposed to 
> > happen.  SmileyChris?  I think these were your mods.
> 
> Not me, I don't smile, but you knew that already ;-)
> 
> > Incidentally, the ZMI panel which uses  seems to have the same
> > sort of problems I am seeing when there is a LocalFS.
> 
> See my comments above.
> 
> I'd roll your own code without using dtml and just iterate over the 
> objectIds method...
> 
> cheers,
> 
> Chris
> 
> 

-- 

___
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] LocalFS problems

2006-05-08 Thread Chris Withers

Dennis Allison wrote:

LocalFS product (1.3-andreas) seems to be having a problem with the
 tag in Zope 2.9.2/Python 2.4.2.  


Then don't use DTML, it does, after all suck (tm) ;-)


The problem seems to be with the tpValues() program in the LocalFS product
which returns an empty list. 


then tpValues() is likely wrong for localfs, unless localfs doesn't want 
to play ball with the tree tag. Given that the tree tag is used by the 
zmi, and you don't really want to display potentially millions of 
sub-objects in the zmi, it might be perfectly legitimate for local-fs to 
do what it's doing...


There seems to be some trickery going on with the isPrincipiaFolderish 
and the tree_view attributes, but I don't quite get what's supposed to 
happen.  SmileyChris?  I think these were your mods.


Not me, I don't smile, but you knew that already ;-)


Incidentally, the ZMI panel which uses  seems to have the same
sort of problems I am seeing when there is a LocalFS.


See my comments above.

I'd roll your own code without using dtml and just iterate over the 
objectIds method...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] LocalFS under Zope2-7-7/windows

2006-04-17 Thread Dieter Maurer
Giuseppe Bonelli wrote at 2006-4-14 18:05 +0200:
>I am migrating some apps to Zope2-7-7 under windows and the LocalFS 
>product generate an error wen starting zope.
>
>The error at the end of the traceback is:
>
>   File 
>"C:\Programmi\Zope-2.7.7-final\lib\python\Signals\WinSignalHandler.py", 
>line 227, in registerHandler
>hevent = win32event.CreateEvent(sa, 0, 0, event_name)
>TypeError: The object is not a PySECURITY_ATTRIBUTES object

This does not look like a "LocalFS" problem.
Instead, it looks like some problem in "WinSignalHandler.py".

However, you might have cut down essential parts of the traceback.


>Any pointer on fixing this?
>Can someone plese confirm that LocalFS works fine under Unixes?

You need a special version of "LocalFS" (something like "LocalFS-Andreas").

We use it for both *nix and Windows.

-- 
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 )


Re: [Zope] localfs cannot save (ValueError: assigning to _p_jar is not supported )

2006-03-14 Thread Dieter Maurer
Luca Dall'Olio wrote at 2006-3-14 12:26 +0100:
>I have created some localfs directory. I can see files from filesystem 
>and delete them from Zope, but  I cannot upload them or modify text 
>files from Zope, because I get the following error :
>
>Traceback (innermost last):
>
>* Module ZPublisher.Publish, line 113, in publish
>* Module ZPublisher.mapply, line 88, in mapply
>* Module ZPublisher.Publish, line 40, in call_object
>* Module Products.LocalFS.LocalFS, line 3, in manage_edit
>* Module OFS.Image, line 449, in manage_edit
>* Module ZODB.Connection, line 853, in register
>
>ValueError: assigning to _p_jar is not supported

"LocalFS" should not touch persistency attributes
at all. Almost surely, the wrapper used by "LocalFS" for a "File"
is a bit too near "OFS.File" which was designed for ZODB storage
(and not a filesystem proxy).

> ...
>Is localfs still supported?

"LocalFS" was always a third party product.
The first author has "LocalFS" meanwhile abandoned.
The latest adaptions to "LocalFS" where done by some "Andreas".
Maybe, he is willing to continue to support "LocalFS".

-- 
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 )


RE: [Zope] LocalFS problem

2006-02-21 Thread Fernando Martins
Hi Chris,

> Fernando Martins wrote:
> > I'm using LocalFS 1.7rc? and Zope 2.8.? in a Suse system. More
> importantly
> > for this case, zope is behind Apache 1.39 with module NTLM,
>
> What are you using to do NTLM?

simply mod_ntlm. I'm following the procedure on this page to do single
sign-on for my Intranet web site:

http://diaryproducts.net/about/cms/zope_plone/zope_plone_sso_single_sign_on_
windows_domain

The software used is also linked from there.

>
> > through FastCGI,
>
> Why on earth would you inflict this on yourself? ;-)
>

Because it is the only way to pass the Apache environmental variable
REMOTE_USER to Zope. This variable is set by Apache after the NTLM
authentication. I suppose PCGI is also possible, but I haven't tried it out.

I'm well aware and concerned that FastCGI has become deprecated for lack of
maintainer. I guess this will be a major upgrade obstacle for those doing
Intranet single sign-on.

Other than that I don't know of any concrete FastCGI problem.

> > When I access a file in a LocalFS folder I get the following
> info, instead
> > of the pdf file (in this case):
> >
> > .
>
> What's the code and urls you're using to access this?

No code, I get this in the browser just with an url like this:

http://mysite.intranet/docs/MyFile.PDF

/mysite/docs is a LocalFS folder that maps to a (Linux) folder /work/docs.
(/mysite is a zope folder invisible for the users, through some URL
rewriting done in Apache)

>
> > The LocalFS folder accessed in the past through
> Apache+mod_rewrite without
> > NTLM+RemoteUserFolder used to work fine.
>
> Interesting...

yes, it was after adding NTLM+FastCGI to Apache+Zope that I got the LocalFS
problems.

>
> > So, the combination Apache+NTLM+FastCGI+RemoteUserFolder with
> LocalFS isn't
> > working well.
>
> My guess would be RemoteUserFolder is the cuplrit. What is this
> RemoteUserFolder and where did you get it from?

Got it from http://www.zope.org/Members/djay/RemoteUserFolder

although I don't follow your logic since RemoteUF works fine with the rest
of zope.

RUF doesn't do any real authentication, I guess, it simply adds the
REMOTE_USER user to the user folder and lets zope know the user is
authenticated. Simple job I guess.

Cheers,
Fernando

>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
>

___
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] LocalFS problem

2006-02-21 Thread Chris Withers

Fernando Martins wrote:

I'm using LocalFS 1.7rc? and Zope 2.8.? in a Suse system. More importantly
for this case, zope is behind Apache 1.39 with module NTLM, 


What are you using to do NTLM?


through FastCGI,


Why on earth would you inflict this on yourself? ;-)


When I access a file in a LocalFS folder I get the following info, instead
of the pdf file (in this case):

.


What's the code and urls you're using to access this?


The LocalFS folder accessed in the past through Apache+mod_rewrite without
NTLM+RemoteUserFolder used to work fine.


Interesting...


So, the combination Apache+NTLM+FastCGI+RemoteUserFolder with LocalFS isn't
working well.


My guess would be RemoteUserFolder is the cuplrit. What is this 
RemoteUserFolder and where did you get it from?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] LocalFS

2006-02-02 Thread Dieter Maurer
Rakotomandimby Mihamina wrote at 2006-2-1 23:22 +0100:
> ...
>But LocalFS seems to be an old product.
>Is there any replacement of it you would know?

"Being old" does not mean "being not good".

I know that you need a relative new "LocalFS" version
(something like "LocalFS-Andreas") to work with Zope 2.8.

I do not know whether this version works with Zope 2.9.
Try it out.

-- 
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 )


Re: [Zope] LocalFS

2006-02-02 Thread Chris Withers

Rakotomandimby Mihamina wrote:

Hi,
In order to learn developping for Zope, I want to learn manipulate large
files.


That's not the best place to start...

Try something simple like a blog, or a simple website...

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] LocalFS

2006-02-01 Thread Chris McDonough
If you're developing at the "Python Product" level (rather than at  
the "through the web" level), this "blob" product might help:


http://www.plope.com/software/blob



On Feb 1, 2006, at 5:22 PM, Rakotomandimby Mihamina wrote:


Hi,
In order to learn developping for Zope, I want to learn manipulate  
large

files.
I read it is not a good idea to store them in the ZODB, so that it  
couls

be a good idea to use LocalFS for example.
I intend to use Zope2.9.
But LocalFS seems to be an old product.
Is there any replacement of it you would know?

--
A powerfull GroupWare, CMS, CRM, ECM: CPS (Open Source & GPL).
Opengroupware, SPIP, Plone, PhpBB, JetSpeed... are good: CPS is  
better.

http://www.cps-project.org for downloads & documentation.
Free hosting of CPS groupware: http://www.objectis.org.

___
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 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] LocalFS under Zope2.9

2006-01-20 Thread Jürgen Herrmann
change the line
"from OFS.content_types..."
to
"from zope.app.content_types"

in LocalFS.py

regrds, juergen herrmann

On Fri, January 20, 2006 19:07, Dennis Allison wrote:
>
> This is the  LocalFS-1.3-andreas version.  Later releases do not appear to
> address this issue.
>
>
> 2006-01-20T09:22:51 ERROR Zope Couldn't install LocalFS
> Traceback (most recent call last):
>   File "/usr/local/src/zope/Zope2.9/lib64/python/OFS/Application.py", line
> 763, in install_product
> global_dict, global_dict, silly)
>   File "/opt/zope/zproducts/standard/LocalFS/__init__.py", line 44, in ?
> import os, LocalFS
>   File "/opt/zope/zproducts/standard/LocalFS/LocalFS.py", line 51, in ?
> from OFS.content_types import find_binary
> ImportError: cannot import name find_binary
> 
>
>
>
>
> --
>
> ___
> 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 )
>


___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de

___
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] LocalFS problems with @import-ing stylesheets

2005-10-10 Thread Peter Bengtsson
2005/10/10, Samuel Souk-aloun <[EMAIL PROTECTED]>:
> I can confirm the problem, the stylesheet is not rendered from localfs
> with firefox
>
> the problem is caused by an incorect http header "text/plain" instead of
> "text/css"
> I've tried to add a type_map to the LocalFS but the content-type does
> not change
> so, for me, it is clearly a LocalFS issue
>
> anyone knows how to hardcode this content-type in LocalFS.py ?

How about setting the content-type in the stylesheet file? That's what
I always do.


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] LocalFS on 2.3.0

2001-01-29 Thread Andy McKay

Ah I think my patch was the wrong way around... but you get the idea :)
--
  Andy McKay.


- Original Message -
From: "Andy McKay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 2:05 PM
Subject: Re: [Zope] LocalFS on 2.3.0


> I patched mine quickly:
>
> --- d:\Zope23\lib\python\Products\LocalFS\LocalFS.pyMon Jan 29
13:57:00
> 2001
>
> +++ d:\lib\python\Products\LocalFS\LocalFS.py   Thu Oct 19 06:42:20 2000
> @@ -270,8 +270,7 @@
>  _local_path = None
>
>  def bobobase_modification_time(self):
> -try: t = os.stat(self._local_path)[stat.ST_MTIME]
> -except: t = time.time()
> +t = os.stat(self._local_path)[stat.ST_MTIME]
>  return DateTime(t)
>
>  def __repr__(self):
> @@ -977,8 +976,7 @@
>  except 'Forbidden': pass
>
>  def bobobase_modification_time(self):
> -try: t = os.stat(self._local_path)[stat.ST_MTIME]
> -except: t = time.time()
> +t = os.stat(self._local_path)[stat.ST_MTIME]
>  return DateTime(t)
>
>  class LocalFile(
>
> However this is just a quick works for me hack.
> --
>   Andy McKay.
>
>
> - Original Message -
> From: "Tim Cook" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 29, 2001 1:08 PM
> Subject: [Zope] LocalFS on 2.3.0
>
>
> >
> > I "thought" LocalFS worked. But now when I import something with
> > a LocalFS defined or attempt to create a new one here's the
> > traceback on:
> >
> > Zope Version  Zope 2.3.0 (binary release, python 1.5.2,
> > linux2-x86)
> >  Python Version 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3]
> >  System Platform linux2
> >
> >
> > Error Type: AttributeError
> > Error Value: _local_path
> >
> > Traceback (innermost last):
> >   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> > 222, in publish_module
> >   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> > 187, in publish
> >   File /usr/local/zope/2.3/lib/python/Zope/__init__.py, line 221,
> > in zpublisher_exception_hook
> > (Object: Traversable)
> >   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> > 171, in publish
> >   File /usr/local/zope/2.3/lib/python/ZPublisher/mapply.py, line
> > 160, in mapply
> > (Object: manage_main)
> >   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> > 112, in call_object
> > (Object: manage_main)
> >   File
> > /usr/local/zope/2.3/lib/python/Shared/DC/Scripts/Bindings.py,
> > line 324, in __call__
> > (Object: manage_main)
> >   File
> > /usr/local/zope/2.3/lib/python/Shared/DC/Scripts/Bindings.py,
> > line 353, in _bindAndExec
> > (Object: manage_main)
> >   File /usr/local/zope/2.3/lib/python/App/special_dtml.py, line
> > 236, in _exec
> > (Object: manage_main)
> >   File /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_In.py,
> > line 711, in renderwob
> > (Object: objectItems)
> >   File
> > /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_With.py, line
> > 146, in render
> > (Object: sequence-key)
> >   File /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_Var.py,
> > line 271, in render
> > (Object: bobobase_modification_time)
> >   File
> > /usr/local/zope/2.3/lib/python/Products/LocalFS/LocalFS.py, line
> > 979, in bobobase_modification_time
> > (Object: myhomedir)
> > AttributeError: (see above)
> >
> >
> >
> >
> > -- Tim Cook, President --
> > Free Practice Management,Inc. | http://www.FreePM.com Office:
> > (901) 884-4126
> > "Liberty has never come from the government." - Woodrow Wilson
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > 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 )
> >
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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 )
>


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] LocalFS on 2.3.0

2001-01-29 Thread Ron Bickers

I submitted the following patch to the LocalFS maintainer not too long ago.
LocalDirectory objects don't have _local_path set, so
bobobase_modification_time() barfs when the new management interface tries
to display the mod time.

--- LocalFS.py-dist Wed Jan 17 14:27:45 2001
+++ LocalFS.py  Wed Jan 17 14:33:21 2001
@@ -976,6 +976,8 @@
 except 'Forbidden': pass

 def bobobase_modification_time(self):
+if not hasattr(self, '_local_path'):
+self._local_path = self.basepath
 t = os.stat(self._local_path)[stat.ST_MTIME]
 return DateTime(t)

@@ -1179,7 +1181,7 @@
 """Change the properties of the file system object."""

 self.title = title
-self.basepath = os.path.normpath(basepath)
+self.basepath = self._local_path = os.path.normpath(basepath)
 self.default_document = default_document or self.default_document
 self.tree_view = self.isPrincipiaFolderish = tree_view
 self.catalog = catalog


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS on 2.3.0

2001-01-29 Thread Fred Yankowski

That patch helped me out.  Thanks.

Kind of unusual, though, for the patch file to _remove_ the fix.  ;-)

-- 
Fred Yankowski   [EMAIL PROTECTED]  tel: +1.630.879.1312
Principal Consultant www.OntoSys.com   fax: +1.630.879.1370
OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS on 2.3.0

2001-01-29 Thread Andy McKay

I patched mine quickly:

--- d:\Zope23\lib\python\Products\LocalFS\LocalFS.pyMon Jan 29 13:57:00
2001

+++ d:\lib\python\Products\LocalFS\LocalFS.py   Thu Oct 19 06:42:20 2000
@@ -270,8 +270,7 @@
 _local_path = None

 def bobobase_modification_time(self):
-try: t = os.stat(self._local_path)[stat.ST_MTIME]
-except: t = time.time()
+t = os.stat(self._local_path)[stat.ST_MTIME]
 return DateTime(t)

 def __repr__(self):
@@ -977,8 +976,7 @@
 except 'Forbidden': pass

 def bobobase_modification_time(self):
-try: t = os.stat(self._local_path)[stat.ST_MTIME]
-except: t = time.time()
+t = os.stat(self._local_path)[stat.ST_MTIME]
 return DateTime(t)

 class LocalFile(

However this is just a quick works for me hack.
--
  Andy McKay.


- Original Message -
From: "Tim Cook" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 1:08 PM
Subject: [Zope] LocalFS on 2.3.0


>
> I "thought" LocalFS worked. But now when I import something with
> a LocalFS defined or attempt to create a new one here's the
> traceback on:
>
> Zope Version  Zope 2.3.0 (binary release, python 1.5.2,
> linux2-x86)
>  Python Version 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3]
>  System Platform linux2
>
>
> Error Type: AttributeError
> Error Value: _local_path
>
> Traceback (innermost last):
>   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> 222, in publish_module
>   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> 187, in publish
>   File /usr/local/zope/2.3/lib/python/Zope/__init__.py, line 221,
> in zpublisher_exception_hook
> (Object: Traversable)
>   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> 171, in publish
>   File /usr/local/zope/2.3/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
> (Object: manage_main)
>   File /usr/local/zope/2.3/lib/python/ZPublisher/Publish.py, line
> 112, in call_object
> (Object: manage_main)
>   File
> /usr/local/zope/2.3/lib/python/Shared/DC/Scripts/Bindings.py,
> line 324, in __call__
> (Object: manage_main)
>   File
> /usr/local/zope/2.3/lib/python/Shared/DC/Scripts/Bindings.py,
> line 353, in _bindAndExec
> (Object: manage_main)
>   File /usr/local/zope/2.3/lib/python/App/special_dtml.py, line
> 236, in _exec
> (Object: manage_main)
>   File /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_In.py,
> line 711, in renderwob
> (Object: objectItems)
>   File
> /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_With.py, line
> 146, in render
> (Object: sequence-key)
>   File /usr/local/zope/2.3/lib/python/DocumentTemplate/DT_Var.py,
> line 271, in render
> (Object: bobobase_modification_time)
>   File
> /usr/local/zope/2.3/lib/python/Products/LocalFS/LocalFS.py, line
> 979, in bobobase_modification_time
> (Object: myhomedir)
> AttributeError: (see above)
>
>
>
>
> -- Tim Cook, President --
> Free Practice Management,Inc. | http://www.FreePM.com Office:
> (901) 884-4126
> "Liberty has never come from the government." - Woodrow Wilson
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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 )
>


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-23 Thread Dieter Maurer

Ulrich Wisser writes:
 > How can I detect if mylfs is a file or a directory?
I fear that is a difficult question.

  For unknown reasons, the builtin Python function "type" is
  considered unsafe (and would not help anyway). Thus,
  you cannot test for types.

  In PythonScript you have the function "same_type"
  that can be used to check whether two type
  are identical.
  I do not know, how well this function works with
  acquisition wrappers.

  There there is "isinstance". As I heard (but did not
  verify) there should be problems with ExtensionClass
  and Acquisition, as well.

Thus, I would not try to determine, whether it is a directory
or file. Instead, I would go for the interface based approach.
Ask yourself, what operations you would need for a directory
or file, respectively. Check for these operations to
differenciate between the two.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-23 Thread Jonothan Farr

> Now I should have a reference to the object in mylfs.
> 
> How can I detect if mylfs is a file or a directory?



--jfarr



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-23 Thread Ulrich Wisser

Hello,

>At 19:54 22.01.2001 +0100, Dieter Maurer wrote:
>
>Ulrich Wisser writes:
>  > How can a get a directory listining with LocalFS
>  > for path "/sub1/sub2/sub3/"? I know I need something
>  > like "lfs['sub1']['sub2']['sub3'].fileids". But
>  > what if there are more (or less) elements in path_to_handle?
>The easiest answer to these types of questions are
>recursive functions.
>
>[...]

this is the code I came up with:

   
   
 
   

Now I should have a reference to the object in mylfs.

How can I detect if mylfs is a file or a directory?

Thanks

Ulrich
-- 
Searchengine Know How  - Webpromotion - Optimization - Internal Search
World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
http://www.publisher.de   Tel: +46-8-53460905Fax: +46-8-534 609 06


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-23 Thread Chris Withers

Ulrich Wisser wrote:
> 
> Hello,
> 
> I try to access LocalFS from my own DTML method.
> (Exactly from my PathHandler method.) I got all
> directory information in one array like this
> 
> path_to_handle = ['sub1', 'sub2', 'sub3']
> 
> How can a get a directory listining with LocalFS
> for path "/sub1/sub2/sub3/"? I know I need something
> like "lfs['sub1']['sub2']['sub3'].fileids". 

Hmmm... try this as a Python (Script|Method|External Method), don't try and do
it in DTML ;-)

object = lfs
for id in path_to_handle:
object = object.get(id)
return object.fileids

you could probably turn that into a one liner with reduce:

return reduce(lamda x,y: x.get(y), [lfs]+path_to_handle).fileids

I'd laugh loads if you could do that in DTML:



Who said you can't write obfuscated python?

*grinz*

Chris

PS: The first method should work, the one may work through sheer fluke, neither
have been tested though...

PPS: Nice to see someone using PathHandler :-)

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-22 Thread Dieter Maurer

Ulrich Wisser writes:
 > How can a get a directory listining with LocalFS
 > for path "/sub1/sub2/sub3/"? I know I need something
 > like "lfs['sub1']['sub2']['sub3'].fileids". But
 > what if there are more (or less) elements in path_to_handle?
The easiest answer to these types of questions are
recursive functions.

You may use a "dtml-in", too. Like that:



  





Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and PathHandler

2001-01-22 Thread Aleksander Salwa

On Mon, 22 Jan 2001, Ulrich Wisser wrote:

> I try to access LocalFS from my own DTML method.
> (Exactly from my PathHandler method.) I got all
> directory information in one array like this
> 
> path_to_handle = ['sub1', 'sub2', 'sub3']
> 
> How can a get a directory listining with LocalFS
> for path "/sub1/sub2/sub3/"? I know I need something
> like "lfs['sub1']['sub2']['sub3'].fileids". But
> what if there are more (or less) elements in path_to_handle?

I would write it in python, as a recursive function:

def goo(lfs, path_to_handle):
   if len(path_to_handle)==0:
  return lfs
   else:
  lfs=lfs[path_to_handle[0]]
  path_to_handle=path_to_handle[1:]
  return goo(lfs, path_to_handle)


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS question

2000-12-12 Thread Jonothan Farr

> At least the "Local File System" object does not expose
> its children via "getattr" (which is required for the
> usual "." operator to work) but only via "[...]".
>
> This probably is a bug.


No this is by design, as explained in the how-to. Most operating systems allow
period (.) characters in filenames, so how would the dtml expression
"LocalFS.some.dir.some.file.plus.extension" be translated to a file system path?

--jfarr



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS question

2000-12-12 Thread Dieter Maurer

Leichtman, David J writes:
 > However, if you try to do the same thing with a LocalFS object, i.e.
 > ,
 > you get the error NameError: localfs_subobject
 > This leads me to believe that LocalFS subobjects are not really objects. But
 > then how does the Zope management interface deal with them, and how can I?
They are real objects but they behave differently from the standard
Zope objects.

You can use
   
 
   

At least the "Local File System" object does not expose
its children via "getattr" (which is required for the
usual "." operator to work) but only via "[...]".

This probably is a bug.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS question

2000-12-12 Thread Aleksander Salwa

On Mon, 11 Dec 2000, Leichtman, David J wrote:
> How do you access an individual object in a LocalFS? By that, I mean:
[...]
> ,
> you get the error NameError: localfs_subobject

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 )




Re: [Zope] LocalFS question

2000-12-12 Thread Jonothan Farr

See the how-to:
http://www.zope.org/Members/jfarr/Products/LocalFS/HowTo/DTML_with_LocalFS
--jfarr

- Original Message -
From: "Leichtman, David J" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 11, 2000 2:54 PM
Subject: [Zope] LocalFS question


>
> How do you access an individual object in a LocalFS? By that, I mean:
>
> If I wanted the last_mod time of any Zope object, I could say  "object.subobject.bobobase_modification_time">.
> However, if you try to do the same thing with a LocalFS object, i.e.
> ,
> you get the error NameError: localfs_subobject
> This leads me to believe that LocalFS subobjects are not really objects. But
> then how does the Zope management interface deal with them, and how can I?
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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 )
>
>


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS question

2000-12-12 Thread Andy McKay

They are real objects, just in a different sense. The easiest way to figure
it out is too look at the dtml that comes in the LocalFS source. For example
to get a listing of LocalFS folder instead of:

objectIds() try fileItems()

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Leichtman, David J" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 11, 2000 2:54 PM
Subject: [Zope] LocalFS question



How do you access an individual object in a LocalFS? By that, I mean:

If I wanted the last_mod time of any Zope object, I could say .
However, if you try to do the same thing with a LocalFS object, i.e.
,
you get the error NameError: localfs_subobject
This leads me to believe that LocalFS subobjects are not really objects. But
then how does the Zope management interface deal with them, and how can I?

___
Zope maillist  -  [EMAIL PROTECTED]
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 )



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS on Win2k

2000-10-12 Thread Diny van Gool

Hi,

I had the same error with LocalFS on a NT 4.0 server. In my case it was a
security problem. Zope wasn't allowed to access the directory I used. Now I
placed my local files in a directory Zope is allowed to read and everything
is working fine.

Diny

At 18:11 11-10-00 -0400, Patrick Randerson wrote:
>
>I'm trying to run LocalFS on Win2K, and access shared disks. I've read the
>instructions for the LocalFS package and followed them...
>When I try to access the LocalFS directory, I get:
>
>Error Type: OSError
>Error Value: [Errno 5] Input/output error
>
>I'm thinking this is a python-windows interface problem. I have Zope
>2.2.2, which seems to come with PyWin build 128. I have found a build 132,
>but I can't install it because I don't have python installed -- only
>standalone Zope.
>
>Anybody using LocalFS to access shared drives on Win2k? 
>I would love some pointers here...


DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl 

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS manage_addFolder solution?

2000-10-02 Thread Dan L. Pierson

"jensebaer" <[EMAIL PROTECTED]> writes:

> __
> 
> > Folder creation isn't really supported in LocalFS at the moment.  Very
> > low level support is there (module function _save_Folder) but it's not
> > intended to be called externally and there doesn't seem to be any path
> > to call it.  There is certainly not a local definition of
> > manage_addFolder in LocalDirectory.  This is on my list of stuff to do
> > for our site, but I don't know if it's on Jonothan's list for the real
> > product.
> It is. It's hard. I'm going to need some help with this one, I'm afraid.
> --jfarr
> __
> 
> My question:
> 
> Is there now a solution to perfom manage_addFolder to LocalFS?

The general case _is_ hard, but special cases can be much easier.  In
an earlier message Jonothan recommended using external methods to add
folders.  We plan to take this approach for our use.  For one thing it
makes enforcing our site policies much easier than a general approach.

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Re: Re: [Zope] LocalFS Documentation

2000-07-13 Thread Jonothan Farr

> Was the LocalFS upload support released?  Earlier versions did not support
> upload, but I know the author was working on it.

Yup. Since 0.8.1.

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Re: Re: [Zope] LocalFS Documentation

2000-07-13 Thread R. David Murray

On Thu, 13 Jul 2000, Kelvin Cheong wrote:
> I'm puzzled...there isn't any upload at the bottom of the page...but there
> has always been an upload at the top of the page in the Zope content
> management interface (along with "Contents", "Edit", "View",
> "Properties"...etc).

Was the LocalFS upload support released?  Earlier versions did not support
upload, but I know the author was working on it.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS Documentation

2000-07-12 Thread Kelvin Cheong


I'm puzzled...there isn't any upload at the bottom of the page...but there
has always been an upload at the top of the page in the Zope content
management interface (along with "Contents", "Edit", "View",
"Properties"...etc).

If you're talking about, the bottom of the page, there is only an Available
objects selection list and an "Add" button.

Perhaps it would be better to let you know that I just installed LocalFS,
and am very new to Zope. And frankly, I don't even know where to start with
the LocalFS product i have installed. The only thing i've done with it so
far is add it into my Zope management console from the Available Objects
list.

Btw, just to fill you in, I'm using Zope 2.1.6 and LocalFS 0.9.4 (could it
possibly be the versioning that makes the difference ??).



[EMAIL PROTECTED] writes:

> If you login as the manager there is an upload link at the bottom of the
> page.
> 
> 
> --Darrell
> 
> From: "Kelvin Cheong" <[EMAIL PROTECTED]>
> >
> > I tried replacing (blindly) the  tag with both
> >  and , and as to my expectations
> > it did not work. How would I actually upload to the LocalFS object
> > (myLocalFS1) I've created?
> >
> > Does anybody know how???
> 
> 

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: Re: [Zope] LocalFS Documentation

2000-07-12 Thread Kelvin Cheong


I'm puzzled...there isn't any upload at the bottom of the page...but there
has always been an upload at the top of the page in the Zope content
management interface (along with "Contents", "Edit", "View",
"Properties"...etc).

If you're talking about, the bottom of the page, there is only an Available
objects selection list and an "Add" button.

Perhaps it would be better to let you know that I just installed LocalFS,
and am very new to Zope. And frankly, I don't even know where to start with
the LocalFS product i have installed. The only thing i've done with it so
far is add it into my Zope management console from the Available Objects
list.

Btw, just to fill you in, I'm using Zope 2.1.6 and LocalFS 0.9.4 (could it
possibly be the versioning that makes the difference ??).



[EMAIL PROTECTED] writes:

> If you login as the manager there is an upload link at the bottom of the
> page.
> 
> 
> --Darrell
> 
> From: "Kelvin Cheong" <[EMAIL PROTECTED]>
> >
> > I tried replacing (blindly) the  tag with both
> >  and , and as to my expectations
> > it did not work. How would I actually upload to the LocalFS object
> > (myLocalFS1) I've created?
> >
> > Does anybody know how???
> 
> 

VCN - The Leader In Corporate Communication Solutions
Visit our website at http://www.vcn.com.my. 
or http://www.vcnlinux.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS Product - where is it?

2000-07-05 Thread joel grimes


>I was looking at the zope site to this mysterious Product that will let me
>use my current pages in a zope server, but it seems to have been taken
>away.  Will it come back or reappear in an update?

Is this what you're looking for?

http://www.zope.org/Members/jfarr/Products/LocalFS/

Joel

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS cache, was Re: ZODB or not ZODB?

2000-06-30 Thread Toby Dickenson

On Thu, 29 Jun 2000 10:44:39 -0700, "Jonothan Farr" <[EMAIL PROTECTED]>
wrote:

>> How do you do to cache those objects, since LocalFS
>> referenced objects are not cached by Zope?
>
>They aren't cached. I experimented with adding a cache, but ran into some
>problems and gave up. It would probably be worth giving it another shot, though.

LocalFS happily uses the If-Modified-Since header, so an http cache (I
use Squid, http://www.squid-cache.org/) can cache LocalFS content
outside of Zope.

This assumes you are using LocalFS to serve whole files over http,
rather than processing those files inside Zope.

Toby Dickenson
[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS and Cache Issues

2000-06-28 Thread Jonothan Farr

> I am using a combination of Zope to create and maintain 
> a MySQL database. This database is full of images files 
> so I decided to keep them outside MySQL for caching 
> facilities. My question are: 1)image files referenced 
> by LocalFS objects are cached by Zope? 

No.

and 2)In this 
> situation do I need to use Apache or only Zope+MySQL?

Just Zope.

--jfarr



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS Question

2000-05-23 Thread Tres Seaver

Jim Sanford <[EMAIL PROTECTED]> wrote:
> 
> Does anyone out there know how I can prevent LocalFS from
> translating CR/LF pairs in a text file to LFs when serving up
> the file?
> 
> Or will I need to "massage" it in Zope before sending it?
> 
> In this case the files are Windows/DOS batch files.
> 
> They will not run with the CR/LFs replaced with LFs.

Assuming that the files are truly stored with the CRLF endings (as
distinct from Jonothan Farr's hypothesis that they have all been
canonicalized to end in LF), you need to get LocalFS to 'open()' the
batch files in binary mode, e.g.,

   if string.lower( filename[:-4] ) == '.bat':
  return open( filename, 'b' )
   else:
  return open( filename )

Tres.
-- 
=
Tres Seaver  [EMAIL PROTECTED]
Digital Creations   "Zope Dealers"   http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] LocalFS Question

2000-05-22 Thread Jonothan Farr

> Does anyone out there know how I can prevent LocalFS from translating CR/LF
> pairs in a text file to LFs when serving up the file?
>
> Or will I need to "massage" it in Zope before sending it?
>
> In this case the files are Windows/DOS batch files.


It sounds like the files have unix endlines on the server and are being served
as binary files. If you set the mime type to text/plain they will get converted
to dos endlines when served to a windows machine. You can use the 'type map'
property to map the .bat extension to text/plain.

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998



___
Zope maillist  -  [EMAIL PROTECTED]
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 )