Re: [Zope-dev] Zope cut paste behaviour

2001-04-16 Thread Martijn Pieters

On Sat, Apr 14, 2001 at 04:37:26PM +0200, Ivo van der Wijk wrote:
  Hmm - we can't just set it to '/', because some people have
  multiple Zope instances mapped to a domain (ex: my.com/foo/
  and my.com/bar/ are aliased to two different Zope instances).
  
  I think what we need to do is figure out the "virtual" root
  url and set the cookie with that path.
  
 
 This sounds difficult. Wouldn't it be easier to use some sort of unique
 zope instance id (if none exists: something like the hostname + port 
 the zope is running on) and use this in the clipboards cookie name?

No, it's quite easy, the REQUEST object has several variables that take
care of this (like REQUEST.BASEPATH1).

Note that cookies are already bound to a particular hostname and port
number, you can at most make them bind to a domain name instead, but this
in not the default behaviour. And it wouldn't solve the problem in this
situation.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Zope cut paste behaviour

2001-04-16 Thread Ivo van der Wijk

On Mon, Apr 16, 2001 at 08:38:16AM +0200, Martijn Pieters wrote:
 On Sat, Apr 14, 2001 at 04:37:26PM +0200, Ivo van der Wijk wrote:
   Hmm - we can't just set it to '/', because some people have
   multiple Zope instances mapped to a domain (ex: my.com/foo/
   and my.com/bar/ are aliased to two different Zope instances).
   
   I think what we need to do is figure out the "virtual" root
   url and set the cookie with that path.
   
  
  This sounds difficult. Wouldn't it be easier to use some sort of unique
  zope instance id (if none exists: something like the hostname + port 
  the zope is running on) and use this in the clipboards cookie name?
 
 No, it's quite easy, the REQUEST object has several variables that take
 care of this (like REQUEST.BASEPATH1).
 
 Note that cookies are already bound to a particular hostname and port
 number, you can at most make them bind to a domain name instead, but this
 in not the default behaviour. And it wouldn't solve the problem in this
 situation.
 

In the situation Brian suggested, 2 zopeservers are running on 1 domain,
probably with apache in front of it. So /foo points to zope server 1 and
/bar points to zope server 2. And you don't want these two to share their
__cp cookie.

And of course each zope server is running on a unique (host,port), but it's
not always certain that the server is accessed this way (i.e. I let my customers
visit www.somedomain.com/manage instead op 
zopehosting.amaze.nl/ZopeHosting/site/manage)

Anyway, I'll look further into it and see what I can come up with.

Vrolijk pasen,

Ivo

-- 
Drs. I.R. van der Wijk  -=-
Brouwersgracht 132  Amaze Internet Services V.O.F.
1013 HA Amsterdam   -=-
Tel: +31-20-4688336   Linux/Unix based corporate   
Fax: +31-20-4688337 and   
Web: http://www.amaze.nl/Internet Solutions   
Email:   [EMAIL PROTECTED]   -=- 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] un-own an object

2001-04-16 Thread Tim McLaughlin

Maybe you should into them more.  I think that they are underappreciated in
the Zope world.  Very rapid dev (although slower performance).  A large part
of the Python dev that I am doing is geared to making ZClasses more
powerful.  take a look at some of my proposals.  The events in particular
make ZClasses much more powerful.  http://www.zope.org/Members/tmclaugh
We've been using the event model for ZClass dev very effectively here at
BCS.  I'll be posting the event code soon.

Tim

-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 9:37 AM
To: Tim McLaughlin
Subject: Re: [Zope-dev] un-own an object


Ah well :-S Never been much fo a ZClass fan myself, anyway :-S

good luck,

Chris

Tim McLaughlin wrote:
 
 except for in my case the user itself is an instance of a ZClass  (see
 ZUserFolder).  so it seems an impasse.  I can do a goofy cut and paste and
 that will work, but it's definitely on the wacked side.
 
 thanks,
 Tim
 
 -Original Message-
 From: Chris Withers [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 13, 2001 5:30 PM
 To: Tim McLaughlin; 'R. David Murray'
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] un-own an object
 
  I meant create an instance of a ZClass owned by a user who no longer
 exists
  (if my 'construct' word made no sense - haven't had coffee yet ;-) ).
 
 Well, the other option is that you can create a user with the same name
and
 the manager role...
 
 cheers,
 
 Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] cvs checkin?

2001-04-16 Thread Andy McKay

Im assuming I dont have a right to do cvs checkins... so how do I get this
tiny stupid little change made, just email Brian ;P?

Make newline_to_br xml compliant br / instead of br:

--- d:\Zope-2.3.0-src\lib\python\DocumentTemplate\old_DT_Var.py Mon Apr 16
08:23
:10 2001
+++ d:\Zope-2.3.0-src\lib\python\DocumentTemplate\DT_Var.py Mon Apr 16
08:22
:24 2001
@@ -361,7 +361,7 @@
 def newline_to_br(v, name='(Unknown name)', md={}):
 v=str(v)
 if find(v,'\r') = 0: v=join(split(v,'\r'),'')
-if find(v,'\n') = 0: v=join(split(v,'\n'),'br\n')
+if find(v,'\n') = 0: v=join(split(v,'\n'),'br /\n')
 return v

 def whole_dollars(v, name='(Unknown name)', md={}):

Cheers.
--
  Andy McKay.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] cvs checkin?

2001-04-16 Thread Casey Duncan

Andy McKay wrote:
 
 Im assuming I dont have a right to do cvs checkins... so how do I get this
 tiny stupid little change made, just email Brian ;P?
 

Collector? Works for me 8^)

http://classic.zope.org:8080/Collector

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`--

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] cvs checkin?

2001-04-16 Thread Andy McKay

I suppose, its just not really a bug and I've always thought of the
collector as bug db.

Cheers.
--
  Andy McKay.


- Original Message -
From: "Casey Duncan" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, April 16, 2001 8:36 AM
Subject: Re: [Zope-dev] cvs checkin?


 Andy McKay wrote:
 
  Im assuming I dont have a right to do cvs checkins... so how do I get
this
  tiny stupid little change made, just email Brian ;P?
 

 Collector? Works for me 8^)

 http://classic.zope.org:8080/Collector

 --
 | Casey Duncan
 | Kaivo, Inc.
 | [EMAIL PROTECTED]
 `--

 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] Zope cut paste behaviour

2001-04-16 Thread Brian Lloyd

 For one, it doesn't seem possible to move an object more up to the root
 (or anywhere not *below* the folder the object was cut/copied from). This
 is partially due to the fact that the __cp (clipboard) cookie has 
 it's path
 set to it's originating folder. I.e move /foo/bar/a to /foo/a or 
 to /blah/a
 
 Clipboards seem to be local to the folder. This may be related to 
 the nature
 of cookies (with their path set to that the path of that folder), 
 I'm not sure.
 If you cut 'a' in /foo/bar, then cut 'b' from / and try to paste 'b' in
 /foo/bar, you'll end up with '/foo/bar/a' again. And as it is not 
 possible 
 to clear your clipboard (esp which opera, which cannot clear 
 cookies), it's 
 very difficult to move objects in these circumstances.

Actually, as of 2.3.x (and for quite some time before), Zope 
uses 'SCRIPT_NAME' as the "path" value for the cookie. That 
should be doing the right thing, except in certain virtual 
hosting situations.

I just checked in a fix that should deal with the odd VH 
situation, but I don't understand why you are seeing the 
behavior that you are. What client are you using? 

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] cvs checkin?

2001-04-16 Thread R. David Murray

On Mon, 16 Apr 2001, Andy McKay wrote:
 I suppose, its just not really a bug and I've always thought of the
 collector as bug db.

One of the options when you submit is "feature request w/patch".
So the "bug collector" probably needs a name change...

On the other hand, we all know about the slippery distinction between
a "bug" and a "feature" grin.

--RDM


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Threads Optimizing Linux.

2001-04-16 Thread Aitor Grajal Crespo



/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Aitor Grajal Crespo
Director General
e-mail: a[EMAIL PROTECTED]

INETSYS, S.L.
ETSI Informática
Ctra. Colmenar, km. 15,500
28049 MADRID
SPAIN
Tfno : (34) 91 348 22 66 - Fax : (34) 91 348 22 
66
http://www.inetsys.es

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Re: [Zope-dev] Threads Optimizing Linux.

2001-04-16 Thread Federico Di Gregorio

Scavenging the mail folder uncovered Aitor Grajal Crespo's letter:
 Hello , my question is a bit complex ( for me ). I have :
 
 - Linux RH 6.1
 - python 1.5.2 --with-thread (source compiled)
 - zope 2.2.x or zope 2.3.x (source compiled)
 
 In any program in python with Linux (inclusive Zope), the threads are processes,i.e, 
they consume memory and dont share it.

this is completely wrong. threads under linux have a different pid
but are created setting the CLONE flag so they share almost anything
(address space, shared objects, etc.)

 In Linux, I have Zope running with 4 Threads. I have five processes and everyone 
consuming about 12 MB = 12 * 5 MB = 60 MB

this is what top tell you, but try using memstat to show the real
memory consumed by each process...

ciao,
federico

-- 
Federico Di Gregorio
MIXAD LIVE Chief of Research  Technology  [EMAIL PROTECTED]
Debian GNU/Linux Developer  Italian Press Contact[EMAIL PROTECTED]
  All programmers are optimists. -- Frederick P. Brooks, Jr.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] cvs checkin?

2001-04-16 Thread Jonothan Farr

  if find(v,'\r') = 0: v=join(split(v,'\r'),'')
 -if find(v,'\n') = 0: v=join(split(v,'\n'),'br\n')
 +if find(v,'\n') = 0: v=join(split(v,'\n'),'br /\n')

Out of curiosity, what is the reason for using join(split(...)) instead of just
replace()? Is it really faster or something?

--jfarr



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] cvs checkin?

2001-04-16 Thread Brian Lloyd

   if find(v,'\r') = 0: v=join(split(v,'\r'),'')
  -if find(v,'\n') = 0: v=join(split(v,'\n'),'br\n')
  +if find(v,'\n') = 0: v=join(split(v,'\n'),'br /\n')
 
 Out of curiosity, what is the reason for using join(split(...)) 
 instead of just
 replace()? Is it really faster or something?

I doubt it - that part of the codebase is quite old, and 
I suspect that replace didn't yet exist when it was 
written.

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: RackImage

2001-04-16 Thread Itai Tavor

Michael R. Bernstein wrote:

Itai Tavor wrote:

  Thanks, Michael! Turns out I just had to make a few small changes in
  my product to get it to work, which I discovered looking at yours.

  Don't know if anything in my product that it would be interesting to
  add to yours... it's aimed at storing photos for a product catalog,
  most of what it adds to Image is methods for creating a photo based
  on another photo, used for creating a thumbnail.

Sure, I'll take a look at it.

Here it is. Hope any of it is any help.
 Photo.py.tgz

-- 
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "If you haven't got your health, you haven't got anything"  --



Re: [Zope-dev] Re: RackImage

2001-04-16 Thread Charlie Blanchard

On Tue, Apr 17, 2001 at 11:11:33AM +1000, Itai Tavor wrote:
[...]
 
 Here it is. Hope any of it is any help.

My Mutt emailer calls the .tgz file a mac-binhex and none of the
usual utilities recognize it as .tgz formatted. Anyone else have
the same problem? What's the magic key to decode this attachment?

tia,

-- 
charlie blanchard
http://baldguru.com/
Founder: LosAngeles area Zope Users Group (lazug.org)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )