[Zope-dev] What should be done with Nulls in Database result sets?

2000-08-11 Thread Jay, Dylan

I have been having all sorts of trouble upgrading from ZODBCDA to ZmxODBC.
The ZODBCDA users RDB.DatabaseResults and ZmxODBC (modified from ZOracleDA)
uses Results.Results. These two classes seem to do exactly the same purpose
and so I suppose one shouldn't exist. The important point is that handle
NULL values very differently. Results let them pass through as None values
whereas DatabaseResults change them to the special value MissingValue.
MissingValue is nice becuase its string representation is an empty string
which is nice on html forms etc. Why doesn't Results do this too? What is
the official word on what a DA should be returning for NULLs?




Dylan Jay   Tel:   +61 2 9886-8961
Avaya Communication FAX:   +61 2 9352 9224
Level 5, 15 Talavera Road   Mobile:+61 409 606 171
Nth Ryde, NSW, 2113 ICQ:   520341
AUSTRALIA   


___
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] Cache-bug in handling of files

2000-08-11 Thread Peter Arvidsson

Guess noone could help me. I chunked it into the bug collector now.

Peter

Peter Arvidsson skrev:
 
 I started this thread on the regular zope mailinglist but now I found a
 similar posting to my problem in the archives.
 
 I have fileobjects where I store pdf-files. If I want to change the
 pdf-file I use the method "manage_upload". The problem is that if I try
 to view it it always choose the one that is in the cache. It displays
 the new one if I open it in a new window or if I save it to disk. The
 filesize and everything else is for the new file. The thread I found was
 this:
 
 
http://zope.nipltd.com/public/lists/zope-archive.nsf/Main/AED89A938194225580256857007679ED?OpenDocumentmode=subjecttopic=[Zope]Dumbobjectaliasingquestion
 
 This points to a bug report and after serching for it I found it:
 
 [754] Zope Bug: Uploaded Images Don't Appear Immediately
 Category: General Last Updated: Oct 29, 1999 7:05 am
 Submitted On: Oct 12, 1999 3:58 am Status: Ongoing
 Reported Version: 2.0.1 Expected/Fixed Version:
 
 The strange thing is that this is still Ongoing after almost a year
 since it was submitted!
 
 There was a fix for the problem in the mailinglist thread but
 1. I dont know if Image.py is used for all files and
 2. I looked in Image.py and didnt fing the code to be similar to the one
 in the thread.
 
 So because I am a newbie in python I want to ask if any1 could take a
 look at this for me and hopefully make a patch or at least get as much
 information I need to chunk it in the collector.
 
 Peter
 
 ___
 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] Cache-bug in handling of files

2000-08-11 Thread Brian Lloyd

 I have fileobjects where I store pdf-files. If I want to change the
 pdf-file I use the method "manage_upload". The problem is 
 that if I try
 to view it it always choose the one that is in the cache. It displays
 the new one if I open it in a new window or if I save it to disk. The
 filesize and everything else is for the new file.

That sounds very suspicious - what are your IE cache settings?


 This points to a bug report and after serching for it I found it:
 
 [754] Zope Bug: Uploaded Images Don't Appear Immediately
 Category: General Last Updated: Oct 29, 1999 7:05 am 
 Submitted On: Oct 12, 1999 3:58 am Status: Ongoing 
 Reported Version: 2.0.1 Expected/Fixed Version: 
 
 The strange thing is that this is still Ongoing after almost a year
 since it was submitted! 

This bug report was related to the fact that the user was 
accessing the file through a Squid cache and that at the 
time (Zope 2.0.1) there was a legitimate bug in the way 
that "If-Modified-Since" headers were handled. Squid was 
actually returning the file to him. It should have been 
marked completed quite a while ago (I just did that).

I am using IE 5 (5.00.2314.1003), cache settings set to: 

"Check for newer versions of stored pages:
  x Every visit to the page

...and I cannot reproduce the problem that you are 
describing :( Are these your cache settings? Are you 
accessing the server through any kind of proxy?

Thanks

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] Cache-bug in handling of files

2000-08-11 Thread Peter Arvidsson



 
 That sounds very suspicious - what are your IE cache settings?
 

[...]

 
 This bug report was related to the fact that the user was
 accessing the file through a Squid cache and that at the
 time (Zope 2.0.1) there was a legitimate bug in the way
 that "If-Modified-Since" headers were handled. Squid was
 actually returning the file to him. It should have been
 marked completed quite a while ago (I just did that).
 
 I am using IE 5 (5.00.2314.1003), cache settings set to:
 
 "Check for newer versions of stored pages:
   x Every visit to the page
 
 ...and I cannot reproduce the problem that you are
 describing :( Are these your cache settings? Are you
 accessing the server through any kind of proxy?
 
 Thanks

I am using IE 5 (5.00.2919.6307), cache settings set to:
"Check for newer versions of stored pages: 
Automatically

Those settings should get the new file if it has changed. 

I am accessing the server through a proxy.. could that be a problem? I
think it would be strange if everyone accessing the website I am
building can see the new files..

What do you think?

Peter

___
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] Cache-bug in handling of files

2000-08-11 Thread Brian Lloyd

 I am using IE 5 (5.00.2919.6307), cache settings set to:
 "Check for newer versions of stored pages: 
 Automatically
 
 Those settings should get the new file if it has changed. 
 
 I am accessing the server through a proxy.. could that be a problem? I
 think it would be strange if everyone accessing the website I am
 building can see the new files..
 
 What do you think?
 
 Peter

Peter - I have done some testing here and I can demonstrate
that this is an IE issue.

I set my cache to "Automatically" like yours and restarted 
it. I then opened a Netscape and created a new file object. 
I instrumented the code in the 'index_html' method of File 
objects so that I could tell _for sure_ whether things were 
actually being called at the server or not. Here's what I 
did:

  - create a file 'myfile.txt', uploading a contents of 
text1.txt into it. 

  - visit the view tab with IE. The server 
confirms that the index_html was called, and the whole 
content was sent, not a 304.

  - now (using netscape again) upload the contents of 
text2.txt into the file object. The mgmt screen 
correctly shows the updated byte length, etc.

  - click the 'view' tab again on IE. My instrumenting 
confirms that IE is not contacting the server *at all* 
no matter how many times I click the 'view' tab, and I 
keep seeing the old content. A look at the headers 
produced by this shows nothing that tells IE it should 
be doing that:

HTTP/1.1 200 OK
Server: Zope/(unreleased version) ZServer/1.1b1
Date: Fri, 11 Aug 2000 15:18:50 GMT
Connection: close
Content-Type: text/plain
Content-Length: 944
Last-Modified: Fri, 11 Aug 2000 15:16:06 GMT

Interestingly, if you open the "view" tab in a new window,
you'll see the updated content. Now, using that same new 
window, set your cursor at the end of the url string in the 
url bar and hit return. IE seems to reload the page, but it 
is not actually even contacting the server. Stranger yet, if 
you click the "refresh" button it *will* contact the server 
(and it passes an If-Modified-Since header, and correctly 
gets a 304 Not Modified). 

Now, use netscape to change the content again. The whole thing 
starts over. Clicking the 'view' link on the page or pressing 
return in the URL bar will not even contact the server and 
the only way to get the updated content is to explicitly press
"refresh" or open a new window, even though the resource 
returned no caching information one way or the other.

I'm going to close that bug report and include this report 
for those who may find it useful in the future.

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] Cache-bug in handling of files

2000-08-11 Thread Jim Sanford

since all the data at my corporate intranet site is pulled from a RDMS, all my 
refrence URLS are generated in JavaScript and have a
rnd="a randomly generated number between 1 and a million" to force the browser to get 
the current page.

 __

  Jim Sanford
  .   Database Engineer
 / \  /   Accelerated Technology, Inc.
/   / 720 Oak Circle Drive East
   /  /  \Mobile, AL 36609
  / / \   Voice: 334-661-5770  fax: 334-661-5788
 / \  E-Mail: [EMAIL PROTECTED]
  Web: http://www.atinucleus.com

 Nucleus.  All You NEED in an RTOS.  Royalty Free
 __


- Original Message -
From: Brian Lloyd [EMAIL PROTECTED]
To: 'Peter Arvidsson' [EMAIL PROTECTED]; Brian Lloyd [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, August 11, 2000 10:44 AM
Subject: RE: [Zope-dev] Cache-bug in handling of files


 I am using IE 5 (5.00.2919.6307), cache settings set to:
 "Check for newer versions of stored pages:
 Automatically

 Those settings should get the new file if it has changed.

 I am accessing the server through a proxy.. could that be a problem? I
 think it would be strange if everyone accessing the website I am
 building can see the new files..

 What do you think?

 Peter

Peter - I have done some testing here and I can demonstrate
that this is an IE issue.

I set my cache to "Automatically" like yours and restarted
it. I then opened a Netscape and created a new file object.
I instrumented the code in the 'index_html' method of File
objects so that I could tell _for sure_ whether things were
actually being called at the server or not. Here's what I
did:

  - create a file 'myfile.txt', uploading a contents of
text1.txt into it.

  - visit the view tab with IE. The server
confirms that the index_html was called, and the whole
content was sent, not a 304.

  - now (using netscape again) upload the contents of
text2.txt into the file object. The mgmt screen
correctly shows the updated byte length, etc.

  - click the 'view' tab again on IE. My instrumenting
confirms that IE is not contacting the server *at all*
no matter how many times I click the 'view' tab, and I
keep seeing the old content. A look at the headers
produced by this shows nothing that tells IE it should
be doing that:

HTTP/1.1 200 OK
Server: Zope/(unreleased version) ZServer/1.1b1
Date: Fri, 11 Aug 2000 15:18:50 GMT
Connection: close
Content-Type: text/plain
Content-Length: 944
Last-Modified: Fri, 11 Aug 2000 15:16:06 GMT

Interestingly, if you open the "view" tab in a new window,
you'll see the updated content. Now, using that same new
window, set your cursor at the end of the url string in the
url bar and hit return. IE seems to reload the page, but it
is not actually even contacting the server. Stranger yet, if
you click the "refresh" button it *will* contact the server
(and it passes an If-Modified-Since header, and correctly
gets a 304 Not Modified).

Now, use netscape to change the content again. The whole thing
starts over. Clicking the 'view' link on the page or pressing
return in the URL bar will not even contact the server and
the only way to get the updated content is to explicitly press
"refresh" or open a new window, even though the resource
returned no caching information one way or the other.

I'm going to close that bug report and include this report
for those who may find it useful in the future.

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 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] OFS.objectManager checking object Ids

2000-08-11 Thread Ty Sarna

In article [EMAIL PROTECTED],
Jim Fulton  [EMAIL PROTECTED] wrote:
  bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS

 I think that it's a bad idea to allow '?'s in ids
 and am sorry if it was allowed. In general, I don't
 like to see characters in ids that need to be quoted.
 I'm not happy that ' ' was added, although 
 I understand why.

Could '=' be added to the allowed characters, please? It works fine that
way, AFAICT, and it's handy if you want to reflect LDAP-like namespaces
in a Zope application. And ZLDAPConnection support '=' in path
components, so it seems kind of silly for Zope itself not to.

___
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] zope2.2.0 and what is high load

2000-08-11 Thread Bak @ kedai

On Fri, 11 Aug 2000, Chris McDonough wrote:
  i went to each Zeo client control_panel, and see that there's
  a mzximum of
  four connections open at any given time.

comments to the above.  i saw only four threads because i started that 
particular box with the default.  on the box with -t25, i see 7 open 
connections at any given time.  sorry, my mistake.


 That's about it for your problem.  Maybe the profiling stuff can give
 more info, I'm not sure.

i'll try and read more about that profiling.  but not knowing what it does 
really scares me :)

 It shows that four threads have database connections.  I'm curious as to
 why you're only seeing four threads being served by database connections
 too.
as mentioned above,  my bad.  right after i sent the prev mail, i went to the 
other box with -t25, and it does have 7 open connections.


 You may want to ramp your number of threads down to 5 (-t5).  25 doesn't
 do much for you because only 7 threads can be using database connections
 at any given time.  The high number of threads you're servicing might
 actually be slowing things down as they contend for available database
 connections.

will do.  and hope to see that it does something.

 Why are you frontending this with apache?  how are you servicing two ZEO
 clients via a single apache?  Does it do some sort of round-robining?
 Or does each box have its own apache? 
each box has its own apache.  i'm round robining (straight dns round robin).  
ZEO is also a concern here because i'm using it blindly, unfortunately.  but 
it works great if i got less than 150 simultaneous connections.  and this 
symptom i saw prevuiously, even without ZEO.

 Is there any reason you're not
 just using straight ZServer?  I'm wondering if apache processes
 contending to talk to available Zope python threads might be slowing
 stuff down?

we need to serve some othe things from apache, that can't be done thru 
ZServer alone (a little php stuff)


 It doesn't seem as if bumping your number of database connections will
 do us any good here, because it doesn't seem you're using all 7.  I'm
 not sure *why* you're not using all 7, because you've got at least 15
 processes waiting around just on your top screen for DB connections.

i did some grepping and saw the magical number 7 in ZODB/DB.py.  is that the 
number to turn up if i wanted to try increasing the db pool connection?  i do 
have postgresql with ZPygreSQL.  will that have anything to do with what i'm 
facing?


 Maybe manage_debug isn't telling you the whole story, or maybe you
 caught it at a low-load period.  I wonder if the profiling stuff would
 help here.

 Maybe someone else can jump in here, this is all I can think of at the
 moment.


thanks for sparing some time helping me out.

i love zope, and open source in general, and i can't bear having to switch to 
using something i don't really like. 

___
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] Reloading file objects?

2000-08-11 Thread Peter Arvidsson

I later found out this was a bug. The bug was reported 1999-10-12 as
number 754:

[754] Zope Bug: Uploaded Images Don't Appear Immediately
Category: General Last Updated: Oct 29, 1999 7:05 am 
Submitted On: Oct 12, 1999 3:58 am Status: Ongoing 
Reported Version: 2.0.1 Expected/Fixed Version: 

Strange that is is still ongoing after almost a year. Anyway the problem
was that it always used the cached file and a discussion about this was
found in the archives: 

http://zope.nipltd.com/public/lists/zope-archive.nsf/Main/AED89A938194225580256857007679ED?OpenDocumentmode=subjecttopic=[Zope]Dumbobjectaliasingquestion

I chunked it into the collector again as bugreport 809 so we just have
to wait and see now.

Peter



Terry Kerr skrev:
 
 are u using netscape?  this seems to be a netscape cache problem.  The same
 happens with images.  You have to download the image to harddisk for
 netscape to update its cache.
 
 Peter Arvidsson wrote:
 
  I have file-objects containing pdf-files. When I change the object to
  contain another pdf-file (with "manage_upload") I get a problem. When I
  want to view the file it still shows the old file. However when I choose
  save to disk I get the new object and if I take a look at its properties
  (size etc...) they are for the new object.
 
  Does anyone know a way to get the file to show the new pdf-file when I
  want to view it?
 
  I have tried to put META HTTP-EQUIV="Pragma" CONTENT="no-cache" in the
  page where I have the link to the file but that doesnt affect the file
  when I open it. The link I use are the path for the file as it is on the
  view-tab of the object. Is there some way to get it to show the new file
  when I view it and not only when I save it to disk or open it in a new
  window?
 
  ___
  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 )
 
 --
 Terry Kerr ([EMAIL PROTECTED])
 Adroit Internet Solutions Pty Ltd (www.adroit.net)
 Phone:   +613 9563 4461
 Fax: +613 9563 3856
 Mobile:  +61 414 938 124
 ICQ: 79303381
 
 ___
 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] problem running Zope

2000-08-11 Thread fardin_habibi
 BDY.RTF


[Zope] Hungry Zopitista Looking for a Revoloution

2000-08-11 Thread Kapil Thangavelu

Hi,

I am a Python/Zope Developer looking for work. Telecommuting or
something in the area of Pasadena, CA. contract, part-time, fulltime.

I tried the Zope job board but response was virtually nonexistent.

My resume is up on my homepage
http://sindev.dyndns.org/Home

viva la revolution.

Kapil Thangavelu

___
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] access via http://some domain/Zope/

2000-08-11 Thread Michael Demers

I have Zope running on two seperate machines. I configured the machines
EXACTLY the same.

The development machine which is MASQed behind the production machine
can access Zope via

http;//localhost:8080
and
http://localhost/Zope/

The production machine can be accessed via

http://www.nitemaster.yi.org:8080
but not by
http://www.nitemaster.yi.org/Zope/

When I try to access via the second method, I keep getting a FORBIDDEN
error message. I have searched file permissions comparing the two
implementations to no avail. System specs to follow in case it is
something with those but I don't believe so.

Development Machine
RedHat 6.2
Apache 1.3.12 (Standard Install from RedHat)
Zope 2.2.0

Production Machine
RedHat 6.1
Apache 1.3.12 - (Custom Install from Sources)
 - /usr/local/apache/ source tree
Zope 2.2.0

I am sure it has something to do with permissions somewhere but I am at
a loss.

ls -l /usr/local/apache/cgi-bin/Zope.cgi
-rwxr-xr-x   1 nobody   nobody582 Aug 10 22:16 Zope.cgi

 ls -l /usr/local/Zope-2.2.0-linux2-x86/pcgi/pcgi-wrapper
-rwxr-xr-x   1 nobody   nobody  36231 Aug 10 22:25
/usr/local/Zope-2.2.0-linux2-x86/pcgi/pcgi-wrapper

If there are any other files that you want the permissions for, just let
me know :)

Michael Demers
Nitemaster Consulting Services
[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] In-tag Batch processing

2000-08-11 Thread Tom Deprez

Thanks Dieter,

But I'm using Zope 2.2

So what am I doing wrong?

Regards, Tom

At 23:02 10/08/2000 +0200, Dieter Maurer wrote:
Tom Deprez writes:
  But how can you provide a link to the next batch of items at the start of
  the batch table?
You need Zope 2.2 or the patch at

   URL:http://www.dieter.handshake.de/pyprojects/zope/dt_in.pat

or you use the "next" argument of the "in" tag.


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] file uploading from IE browser

2000-08-11 Thread Seb Bacon

What's the HTML you're using for the upload?


 
 Hi All,
 
 I'ved followed the online How-To on implementing a simple service for
 parsing uploaded files via the browser.  But strangely, it 
 only works for
 Netscape browsers.  When I test the uploading using IE, the 
 supposed file
 object becomes a string object, causing all sorts of 
 problems.  How am I
 suppose to get the file object from IE browsers?  Thanks in advance!
 
 Dave 

___
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] Batch processing

2000-08-11 Thread Tom Deprez

Hi,

few q'ns concerning batch processing:

1. I want the user to be able to choose a batch-page. So, when a query is
done, I want to show something like :

 previous page 1 - 2 - 3 - 4 - 5 next page.

The following code works partly: ie. the one thing missing is that it
doesn't shows the current page. How can I implement this?

dtml-in address_lookup previous size=5 start=query_start
   dtml-in previous-batches mapping
 dtml-unless sequence-startnbsp;
 /dtml-unless
 a href="dtml-var document_iddtml-var
sequence-queryquery_start=dtml-var batch-start-number"
 dtml-var
"(_.getitem('batch-start-index',0)/_.getitem('batch-size',0))+1"/a
   /dtml-in
/dtml-in

dtml-in address_lookup next size=5 start=query_start
   dtml-in next-batches mapping
 dtml-unless sequence-startnbsp;
 /dtml-unless
 a href="dtml-var document_iddtml-var
sequence-queryquery_start=dtml-var batch-start-number"
 dtml-var
"(_.getitem('batch-start-index',0)/_.getitem('batch-size',0))+1"/a
   /dtml-in
/dtml-in

dtml-in address_lookup size=5 start=query_start
...
/dtml-in

2. Is there an easier way to get what I want?

3. Does the above code means that it has to iterate 3 times over the list?
  Isn't there a way so that it needs only one pass over the list?

Thanks in advance,

Tom Deprez.



___
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] Difference between manage_changeProperties and manage_editProperties?

2000-08-11 Thread Peter Arvidsson

What is the difference? Somewhere I read that one of them erased all
properties and changed those that are sent to the method (causing
properties that is not sent to the method to be empty) but I dont
remeber where I read it or which one it was? Are there any other
differences?

___
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] Defining High Load in Heavily DB Driven site (was: [Zope] zope2.2.0 and what is high load)

2000-08-11 Thread Dario Lopez-Kästen

Hello!

I need to find more info on how Zope handles threading with relation to
database connections.

I am currently considering and evaluating Zope as one of the options we have
to build a really large, completely databasedriven "enterprise scale"
web-platform. I am a bit worried about this "maximum of 7 threads per db
connection" limitation mentioned previously, and I need to know a) what does
this mean in terms of accesibility, b) how does it affect performace, and c)
how does Zope work (in detail) with external database connections.

We are going to be using Oracle as our DB backend, all our served data will
be database *only* (some of it will be fairly large), and efficient database
connections is *crucial* to what we intend to do.

We are going to have between 10-20k users at most and I expect the maximun
of simultaneous connections to be beween 400 - 900 under heavy load; "normal
load" will probably oscillate around 25-200 simultaneous connections (these
numbers are crude guesses, but take into account increased usage over time
as more services are provided in the future).

Bandwith problems are not an issue, nor is computing power.

I would appreciate any pointers to documentation or people to ask.

Sincerely,

/dario

- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services


___
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] Python + COM (from external method)

2000-08-11 Thread Steinar Rune Eriksen

How come this fails...
--
import win32com.client
oOleObj = win32com.client.Dispatch("DSOleFile.PropertyReader")
--

when run from Zope (within and External Method) when it works from Python
standalone on the same machine ?


SRE





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

Admin
Orion System AS
**

___
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] application/octet-stream vs. application/msword

2000-08-11 Thread Jean Jordaan

Hi Dieter  all

  How does Zope recognize the type of a file?
 It uses "OFS.content_types.guess_content_type" 

OK, so 'manage_addFile' uses 'guess_content_type'?

I'm a bit confused here .. I see three lists of content
types, excerpted below. They are in:

  1. 'lib/python/OFS/content_types.py'

  2. 'bin/lib/mimetypes.py' and

  3. 'ZServer/medusa/mime_type_tabel.py'

There is some overlap between the lists (eg. '.doc' occurs
in 1 and in 3, and '.cdf' occurs in all three). What relation
is there between the lists? 

The other thing I'm wondering is, it looks as if '.doc' should
*always* be recognized as msword. How could it sometimes turn up
as octet-stream? To add documents I call:

  a href="manage_addProduct/ccDoc/ccDocClass_factory"
  Add a document./a

The initial method of 'ccDocClass_factory' is 'ccDocClass_addForm',
and that form's action is 'ccDocClass_add' which eventually calls:

  dtml-call "manage_addFile('', file, '')"

So how come '.doc's get added as application/octet-stream ?

Excerpts:
-

In 'lib/python/OFS/content_types.py' I find:


# This gives us a hook to add content types that
# aren't currently listed in the mimetypes module.
_addtypes=(
('.cdf', 'application-x-cdf'),
('.doc', 'application/msword'),
[...]
('.xul', 'text/xul'),
)


and in 'bin/lib/mimetypes.py' I find:


types_map = {
[...]
'.bcpio': 'application/x-bcpio',
'.bin': 'application/octet-stream',
'.cdf': 'application/x-netcdf',
'.cpio': 'application/x-cpio',
'.csh': 'application/x-csh',
[...]
'.zip': 'application/zip',
}


and, finally, in 'ZServer/medusa/mime_type_tabel.py' I find:


# Converted by ./convert_mime_type_table.py from:
# /usr/src2/apache_1.2b6/conf/mime.types
#
content_type_map = \
  {
[...]
   'cdf':  'application/x-netcdf',
[...]
   'doc':  'application/msword',
[...]
   'zip':  'application/zip',
  }


-- 
jean

___
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] Python + COM (from external method)

2000-08-11 Thread Phil Harris

Steinar,

Did you call pythoncom.CoInitialize()?

If not you need to.

hth

Phil
[EMAIL PROTECTED]


- Original Message - 
From: "Steinar Rune Eriksen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 11, 2000 12:49 PM
Subject: [Zope] Python + COM (from external method)


 How come this fails...
 --
 import win32com.client
 oOleObj = win32com.client.Dispatch("DSOleFile.PropertyReader")
 --
 
 when run from Zope (within and External Method) when it works from Python
 standalone on the same machine ?
 
 
 SRE
 
 
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 
 Admin
 Orion System AS
 **
 
 ___
 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] Batch Processing, final

2000-08-11 Thread Tom Deprez

Pfew, I managed to implement the thing I wanted. However I'm not satisfied.
There must be an easier solution. If somebody knows which, then please let
me know! Thanks. Here is the code I use to display something like in a
search result :

 Previous  1 2 3 4 5 6 Next

dtml-in address_lookup size=5 start=query_start

   dtml-if sequence-start
  pSearch Result : dtml-var count-CENTRE_NOnbsp;matchesp
  table width="100%"
  tr
   td align="left" width="60"
!-- if not first page then show previous button --
dtml-if previous-sequence
  a href="dtml-var URLdtml-var
sequence-queryquery_start=dtml-var previous-sequence-start-number"
dtml-var "gif_previous.tag(border='0')"/a
/dtml-if
   /td
   td align="center"
 !-- show previous page numbers --
 dtml-in address_lookup previous size=5 start=query_start 
   dtml-in previous-batches mapping
 a href="dtml-var document_iddtml-var
sequence-queryquery_start=dtml-var batch-start-number"
 dtml-var
"(_.getitem('batch-start-index',0)/_.getitem('batch-size',0))+1"/a
   /dtml-in
 /dtml-in
 !-- show present page number--
 dtml-var
"(_.getitem('sequence-index',0)/_.getitem('sequence-step-size',0))+1"/a
 !-- show next pages numbers--
 dtml-in address_lookup next size=5 start=query_start
   dtml-in next-batches mapping
 a href="dtml-var document_iddtml-var
sequence-queryquery_start=dtml-var batch-start-number"
 dtml-var
"(_.getitem('batch-start-index',0)/_.getitem('batch-size',0))+1"/a
   /dtml-in
 /dtml-in
   /td
   td align="right" width="60"
 !-- if not last page then show next button --
 dtml-if
"((_.getitem('sequence-index',0)+_.getitem('sequence-step-size',0))+1) 
(_.getitem('count-CENTRE_NO',0))"
 a href="dtml-var URLdtml-var
sequence-queryquery_start=dtml-var
"(_.getitem('sequence-index',0)+_.getitem('sequence-step-size',0))+1""
  dtml-var "gif_next.tag(border='0')"/a
 /dtml-if
   /td
  /tr
  /table
   /dtml-if sequence-start

 show present page results ...

/dtml-in

Regards, Tom.

___
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] Defining High Load in Heavily DB Driven site (was: [Zope] zope2.2.0 and what is high load)

2000-08-11 Thread Jens Vagelpohl

hi dario,

to clear up some possible misunderstandings and naming issues:

we have two different beasts here. one is the number of threads that
zope uses while it runs. this can be tweaked by invoking the start
script with an argument like "t number_of_threads" or by editing z2.py
and changing the default number of 4 threads. again, these are
application threads.

the database connections that were talked about are a different issue.
these refer to the number of connections zope creates to its underlying
ZODB object store. you can see them if you go to
myzope/Control_Panel/manage_debug in Zope  2.2.0 or by using the link
in the control panel in Zope  2.2.0. the number of these connections is
set in zope/lib/python/ZODB/DB.py and the default is 7.

in general, when a thread attempts to do anything with zope it needs to
get hold of a ZODB connection so it can read or otherwise manipulate
objects in the ZODB. this is why the number of application threads
should be smaller than the number of ZODB connections. tweaking these
numbers is possible, but mileage may vary depending on your specific
site and usage.

jens



Jens Vagelpohl  [EMAIL PROTECTED]
Software Engineer www.digicool.com
Digital Creations   (888) 344-4332

Got Zope?

 
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On 
 Behalf Of Dario
 Lopez-Kästen
 Sent: Friday, August 11, 2000 07:10
 To: [EMAIL PROTECTED]
 Subject: [Zope] Defining High Load in Heavily DB Driven site (was:
 [Zope] zope2.2.0 and what is high load)
 
 
 Hello!
 
 I need to find more info on how Zope handles threading with 
 relation to
 database connections.
 
 I am currently considering and evaluating Zope as one of the 
 options we have
 to build a really large, completely databasedriven "enterprise scale"
 web-platform. I am a bit worried about this "maximum of 7 
 threads per db
 connection" limitation mentioned previously, and I need to 
 know a) what does
 this mean in terms of accesibility, b) how does it affect 
 performace, and c)
 how does Zope work (in detail) with external database connections.
 
 We are going to be using Oracle as our DB backend, all our 
 served data will
 be database *only* (some of it will be fairly large), and 
 efficient database
 connections is *crucial* to what we intend to do.
 
 We are going to have between 10-20k users at most and I 
 expect the maximun
 of simultaneous connections to be beween 400 - 900 under 
 heavy load; "normal
 load" will probably oscillate around 25-200 simultaneous 
 connections (these
 numbers are crude guesses, but take into account increased 
 usage over time
 as more services are provided in the future).
 
 Bandwith problems are not an issue, nor is computing power.
 
 I would appreciate any pointers to documentation or people to ask.
 
 Sincerely,
 
 /dario
 

___
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] Login and password

2000-08-11 Thread Tom Deprez

Hi,

I'm wondering is it possible to implement a way that Zope asks for a
password, but not for a login?

eg. like you would give several people the same login  password, but that
the users don't have to enter the login, only the password?

Thanks, Tom.

___
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] ZClass inheriting from image question

2000-08-11 Thread Meeting Maker Webmaster

Hello,

At 18:36 10.08.2000 +, Kapil Thangavelu wrote:
make a dtml doc id:return_image
with body
dtml-var data

and use that as your source
so in index_html

img src="dtml-var "return_image.absolute_url()""

Works great. Thank you very much for your help.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.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] Defining High Load in Heavily DB Driven site (was: [Zope] zope2.2.0 and what is high load)

2000-08-11 Thread Paul Everitt

"Dario Lopez-Kästen" wrote:
 
 Hello!

Hello Dario!

 I need to find more info on how Zope handles threading with relation to
 database connections.

How about:

  http://www.zope.org/Documentation/Developer/Models/ZODB

The jargon of threads and connections (and then threads again) can be
pretty confusing in Zope.

First, ZServer is the thing in front listening for socket requests.  It
has a connection pool (select based) which maps into Python threads in
the Zope application.  (ZServer is part of the Zope process, I'm
discussing logical partitioning.)

Each concept of a "thread" in Zope is actually a "database connection"
to the ZODB.  Threads get a private copy of the transaction space, thus
greatly simplifying (to the point of removal) the need for programmers
to think about thread safety.

If you're talking about the thread concurrency a connection to Oracle,
then that's a bit different.  I _think_ that ultimately this maps to the
number of Zope database connections.

This conversation is probably better in the zope-dev list.

 I am currently considering and evaluating Zope as one of the options we have
 to build a really large, completely databasedriven "enterprise scale"
 web-platform. I am a bit worried about this "maximum of 7 threads per db

This isn't a maximum.  It's just the default.  It's easy to increase the
number of connections.

 connection" limitation mentioned previously, and I need to know a) what does
 this mean in terms of accesibility, b) how does it affect performace, and c)
 how does Zope work (in detail) with external database connections.
 
 We are going to be using Oracle as our DB backend, all our served data will
 be database *only* (some of it will be fairly large), and efficient database
 connections is *crucial* to what we intend to do.

Since you're not using any persistent objects in Zope (unless you do
caching of the SQL data, which you probably should), then you don't have
to worry about process growth from having more database connections for
Zope.  Jack it up to 25.

Since much of the time in a Zope hit is taken by rendering to HTML, a
number like 25 probably means you can process a hundred simultaneous
Oracle requests.  That works out to be an average of around ten million
hits per day.  If you want more, increase the number.

 We are going to have between 10-20k users at most and I expect the maximun
 of simultaneous connections to be beween 400 - 900 under heavy load; "normal
 load" will probably oscillate around 25-200 simultaneous connections (these
 numbers are crude guesses, but take into account increased usage over time
 as more services are provided in the future).
 
 Bandwith problems are not an issue, nor is computing power.
 
 I would appreciate any pointers to documentation or people to ask.

Is this an intranet or a public site?

--Paul

___
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] No file in INPUT TYPE='file' field

2000-08-11 Thread Mabe, Brad

I love this list!  I am designing a file upload form and just started
thinking about how I am going to handle invalid filenames, no filename, etc.
Of course, rather than doing "real work" I decided to take some time and
catch up with my e-mail and viola! Here is this thread.

Thanks Peter!

-=Brad=-

-Original Message-
From: Peter Arvidsson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 10, 2000 4:07 AM
To: Alexander Chelnokov
Cc: zope
Subject: Re: [Zope] No file in INPUT TYPE='file' field


Hi

I use this code to check if the input is empty:
dtml-if "name_of_file_input.filename"
Exists...

To check if the input is a valid file you can store it as a temporary
variable and then make a check if the size of the object is more than 0
bytes like this:
dtml-if "_.getitem(temp_object_id,0).getSize()  0"
Valid file...

I hope this helps you :)

Peter


Alexander Chelnokov skrev:
 
 Hello All,
 
 How to define in DTML that user put nothing into the
 field INPUT TYPE="file"...?
 Give pls an example of code.
 
 Best regards,
  Alexander N. Chelnokov
 Ural Scientific Institute of Traumatology and Orthopaedics
 str.Bankovsky, 7. Ekaterinburg 620014 Russia
 ICQ: 25640913
 
 ___
 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] zope2.2.0 and what is high load

2000-08-11 Thread Chris McDonough

 On Fri, 11 Aug 2000, Chris McDonough wrote:
   i went to each Zeo client control_panel, and see that there's
   a mzximum of
   four connections open at any given time.
 
 comments to the above.  i saw only four threads because i 
 started that 
 particular box with the default.  on the box with -t25, i see 7 open 
 connections at any given time.  sorry, my mistake.

Oh, ok... that makes more sense.

  You may want to ramp your number of threads down to 5 
 (-t5).  25 doesn't
  do much for you because only 7 threads can be using 
 database connections
  at any given time.  The high number of threads you're 
 servicing might
  actually be slowing things down as they contend for 
 available database
  connections.
 
 will do.  and hope to see that it does something.

Based on your findings that all 7 DB connections are being used, I'd
revise the number of threads to 8.

  It doesn't seem as if bumping your number of database 
 connections will
  do us any good here, because it doesn't seem you're using 
 all 7.  I'm
  not sure *why* you're not using all 7, because you've got 
 at least 15
  processes waiting around just on your top screen for DB connections.
 
 i did some grepping and saw the magical number 7 in 
 ZODB/DB.py.  is that the 
 number to turn up if i wanted to try increasing the db pool 
 connection?  i do 
 have postgresql with ZPygreSQL.  will that have anything to 
 do with what i'm 
 facing?

Yes, it's the pool_size parameter.  You can increment this value
*carefully* if you see that you have more threads hanging around than DB
connections, like you're seeing now.  I have no idea what this will do
to your relational stuff.

The "right thing to do" is to test this outside of production.  I don't
want to tell you to go ahead and muck around on a production server.
But if it were *me*, I might be tempted to:

- First, lower the number of threads via -t8 and see what effect that
has on speed.

- If that doesn't solve anything, bump up both the NUMBER_OF_THREADS and
the pool_size up to 10 or 12, then do some checking, and see if you
still have threads waiting for a DB.  Continue doing this in increments
of 2 or 4, making notes as you go.

Note that if it breaks your site, I'll deny I ever gave you this advice.
:-)  Proceed at your own risk.

 i love zope, and open source in general, and i can't bear 
 having to switch to 
 using something i don't really like. 

Geez, I hope not.  This is an eminently solveable problem.

___
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] Defining High Load in Heavily DB Driven site (was: [Zope] zope2.2.0 and what is high load)

2000-08-11 Thread Chris McDonough

Here's my understanding of how it works:

- The number of threads is decided by NUMBER_OF_THREADS in z2.py or the
command line argument -t[whatever].

- You can give ZServer/Zope a hundred threads if you want to, but if you
want more DB connections to service those threads with, you need to
change the pool_size in DB.py.  

Because Dario's site is hypothetical at the moment, it's probably not a
good idea to start out by changing these parameters.  He should probably
just try it out at default, knowing that he can (carefully) bump these
values up as necessary if he notices problems.  It's sort of pointless
to guess about how to increase speed until you know you need it to be
increased.  Zope can handle this kind of load, it's just a matter of
hitting the sweet spot.  In order to do that, you need to do some
profiling work, unfortunately.

 -Original Message-
 From: Paul Everitt [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 11, 2000 9:03 AM
 To: Dario Lopez-Kästen
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Defining High Load in Heavily DB Driven site (was:
 [Zope] zope2.2.0 and what is high load)
 
 
 "Dario Lopez-Kästen" wrote:
  
  Hello!
 
 Hello Dario!
 
  I need to find more info on how Zope handles threading with 
 relation to
  database connections.
 
 How about:
 
   http://www.zope.org/Documentation/Developer/Models/ZODB
 
 The jargon of threads and connections (and then threads again) can be
 pretty confusing in Zope.
 
 First, ZServer is the thing in front listening for socket 
 requests.  It
 has a connection pool (select based) which maps into Python threads in
 the Zope application.  (ZServer is part of the Zope process, I'm
 discussing logical partitioning.)
 
 Each concept of a "thread" in Zope is actually a "database connection"
 to the ZODB.  Threads get a private copy of the transaction 
 space, thus
 greatly simplifying (to the point of removal) the need for programmers
 to think about thread safety.
 
 If you're talking about the thread concurrency a connection to Oracle,
 then that's a bit different.  I _think_ that ultimately this 
 maps to the
 number of Zope database connections.
 
 This conversation is probably better in the zope-dev list.
 
  I am currently considering and evaluating Zope as one of 
 the options we have
  to build a really large, completely databasedriven 
 "enterprise scale"
  web-platform. I am a bit worried about this "maximum of 7 
 threads per db
 
 This isn't a maximum.  It's just the default.  It's easy to 
 increase the
 number of connections.
 
  connection" limitation mentioned previously, and I need to 
 know a) what does
  this mean in terms of accesibility, b) how does it affect 
 performace, and c)
  how does Zope work (in detail) with external database connections.
  
  We are going to be using Oracle as our DB backend, all our 
 served data will
  be database *only* (some of it will be fairly large), and 
 efficient database
  connections is *crucial* to what we intend to do.
 
 Since you're not using any persistent objects in Zope (unless you do
 caching of the SQL data, which you probably should), then you 
 don't have
 to worry about process growth from having more database 
 connections for
 Zope.  Jack it up to 25.
 
 Since much of the time in a Zope hit is taken by rendering to HTML, a
 number like 25 probably means you can process a hundred simultaneous
 Oracle requests.  That works out to be an average of around 
 ten million
 hits per day.  If you want more, increase the number.
 
  We are going to have between 10-20k users at most and I 
 expect the maximun
  of simultaneous connections to be beween 400 - 900 under 
 heavy load; "normal
  load" will probably oscillate around 25-200 simultaneous 
 connections (these
  numbers are crude guesses, but take into account increased 
 usage over time
  as more services are provided in the future).
  
  Bandwith problems are not an issue, nor is computing power.
  
  I would appreciate any pointers to documentation or people to ask.
 
 Is this an intranet or a public site?
 
 --Paul
 
 ___
 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] Python + COM (from external method)

2000-08-11 Thread Steinar Rune Eriksen

That worked. Thanks

 -Original Message-
 From: Phil Harris [SMTP:[EMAIL PROTECTED]]
 Sent: Freitag, 11. August 2000 14:06
 To:   Steinar Rune Eriksen; [EMAIL PROTECTED]
 Subject:  Re: [Zope] Python + COM (from external method)
 
 Steinar,
 
 Did you call pythoncom.CoInitialize()?
 
 If not you need to.
 
 hth
 
 Phil
 [EMAIL PROTECTED]
 
 
 - Original Message - 
 From: "Steinar Rune Eriksen" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 11, 2000 12:49 PM
 Subject: [Zope] Python + COM (from external method)
 
 
  How come this fails...
  --
  import win32com.client
  oOleObj = win32com.client.Dispatch("DSOleFile.PropertyReader")
  --
  
  when run from Zope (within and External Method) when it works from
 Python
  standalone on the same machine ?
  
  
  SRE
  
  
  
  
  
  **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the system manager.
  
  This footnote also confirms that this email message has been swept by
  MIMEsweeper for the presence of computer viruses.
  
  Admin
  Orion System AS
  **
  
  ___
  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 )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

Admin
Orion System AS
**

___
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] Start-up log? was[ZMySQLDA on Win32]

2000-08-11 Thread William BC Crandall

Phil,

Thanks for the send and resend. The pack you sent is
version: 'ZMySQLDA-1-1-3'. I was getting SOME success 
with 1.1.4 (MySQL log files would show activity). 

When I replace the set I had with what you sent, 
I do not even find 'Z MySQL Database Connection'
as an object to create in the Zope manage pages.
There are also error messages which scroll of the 
Zope console start-up window (cannot find a .dll...).

Which brings me to my current most pressing question:

Is there a log file that records Zope's start-up news?
(I've looked at zope/var/Z2.log, but it doesn't show
the start-up tales.)

Thanks again for helping the new guy.

Regards,


Phil Harris wrote:
 
 William,
 
 I sent this to you a few days ago, but it bounced back.
 
 Phil
 
 - Original Message -
 From: "Phil Harris" [EMAIL PROTECTED]
 To: "William BC Crandall" [EMAIL PROTECTED]
 Sent: Wednesday, August 09, 2000 3:39 PM
 Subject: Re: [Zope] ZMySQLDA on Win32 - connect then crash
 
  William,
 
  attached, my latest version of the mysql adapter (not written by me, just
  compiled by me).

___
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] PB with zodbca object, very Important !!!!!!!!!!!!!!!!

2000-08-11 Thread kguesnet



When I create or use an object with a zodbc connection, and when I try to see a dtml page using it, zope open a login window (login with password) , but I don't know what it is, because I try lot of password (zope manager password, zope simple user password, Pc user password ) no one can give me the access to the view of the dtml page.

has anyone this sort of problem, and does anyone have a solution 

thks a lot for your answer 
david sergent


Re: [Zope] Python + COM (from external method)

2000-08-11 Thread Toby Dickenson

That might seem to work, but you will run into subtle bugs eventually.
Check the mailing list archives (or the Collector) for tips on calling
CoInitializeEx.

On Fri, 11 Aug 2000 16:00:08 +0200, Steinar Rune Eriksen
[EMAIL PROTECTED] wrote:

That worked. Thanks

 -Original Message-
 From:Phil Harris [SMTP:[EMAIL PROTECTED]]
 Sent:Freitag, 11. August 2000 14:06
 To:  Steinar Rune Eriksen; [EMAIL PROTECTED]
 Subject: Re: [Zope] Python + COM (from external method)
 
 Steinar,
 
 Did you call pythoncom.CoInitialize()?
 
 If not you need to.


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] Defining High Load in Heavily DB Driven site (was: [Zope] zope2.2.0 and what is high load)

2000-08-11 Thread bak @ kedai


in general, when a thread attempts to do anything with zope it needs to
get hold of a ZODB connection so it can read or otherwise manipulate
objects in the ZODB. this is why the number of application threads
should be smaller than the number of ZODB connections. tweaking these
numbers is possible, but mileage may vary depending on your specific
site and usage.
---
as noted by chris M, if i were to bump up the zodn connection pool, it
better be more than the app thread, right?

so, in my previous case, i increased the app threads to be more than the
zodb connection pool.  what does this entail?  i'm not too sure.  i intend
to increase the app thread number and the connection pool number, to see
whether these increase will have any effeect on my currently loaded site.

one tiny question, what will all these do to my rdb connection.  my DA is
not thread safe, me think. (ZPYgreSql)

jens

thanks


Jens Vagelpohl  [EMAIL PROTECTED]
Software Engineer www.digicool.com
Digital Creations   (888) 344-4332

Got Zope?




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Dario
 Lopez-Kästen
 Sent: Friday, August 11, 2000 07:10
 To: [EMAIL PROTECTED]
 Subject: [Zope] Defining High Load in Heavily DB Driven site (was:
 [Zope] zope2.2.0 and what is high load)


 Hello!

 I need to find more info on how Zope handles threading with
 relation to
 database connections.

 I am currently considering and evaluating Zope as one of the
 options we have
 to build a really large, completely databasedriven "enterprise scale"
 web-platform. I am a bit worried about this "maximum of 7
 threads per db
 connection" limitation mentioned previously, and I need to
 know a) what does
 this mean in terms of accesibility, b) how does it affect
 performace, and c)
 how does Zope work (in detail) with external database connections.

 We are going to be using Oracle as our DB backend, all our
 served data will
 be database *only* (some of it will be fairly large), and
 efficient database
 connections is *crucial* to what we intend to do.

 We are going to have between 10-20k users at most and I
 expect the maximun
 of simultaneous connections to be beween 400 - 900 under
 heavy load; "normal
 load" will probably oscillate around 25-200 simultaneous
 connections (these
 numbers are crude guesses, but take into account increased
 usage over time
 as more services are provided in the future).

 Bandwith problems are not an issue, nor is computing power.

 I would appreciate any pointers to documentation or people to ask.

 Sincerely,

 /dario


___
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] zope2.2.0 and what is high load

2000-08-11 Thread bak @ kedai



Based on your findings that all 7 DB connections are being used, I'd
revise the number of threads to 8.

will give it a go this monday.
Yes, it's the pool_size parameter.  You can increment this value
*carefully* if you see that you have more threads hanging around than DB
connections, like you're seeing now.  I have no idea what this will do
to your relational stuff.
---that really scares me.  sailing the uncharted see, and me a non swimmer!

The "right thing to do" is to test this outside of production.  I don't
want to tell you to go ahead and muck around on a production server.
But if it were *me*, I might be tempted to:

--like you, i'm tempted too.   i'll do backup first before anything else.
furthermore, i can't get the amount of traffic to really test.

- First, lower the number of threads via -t8 and see what effect that
has on speed.

- If that doesn't solve anything, bump up both the NUMBER_OF_THREADS and
the pool_size up to 10 or 12, then do some checking, and see if you
still have threads waiting for a DB.  Continue doing this in increments
of 2 or 4, making notes as you go.

Note that if it breaks your site, I'll deny I ever gave you this advice.
:-)  Proceed at your own risk.

---thanks for the advice that's not given ;) ,  i'll report progress monday!

Geez, I hope not.  This is an eminently solveable problem.

--i hope to solve this, and prove the greatness of OSS!


___
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] Hungry Zopitista Looking for a Revoloution

2000-08-11 Thread Kapil Thangavelu

ARGH!!!

For anyone interested, my homepage is up and accessible.

So how come my home page was inaccessible?

I had a web-based logging system setup from when my account was hosted
at lostworld.imeme.net, which was causing problems although I checked it
with newly started browsers on two of my machines, it didn't register
them because they were already in the logs.

Kapil


Kapil Thangavelu wrote:
 
 Hi,
 
 I am a Python/Zope Developer looking for work. Telecommuting or
 something in the area of Pasadena, CA. contract, part-time, fulltime.
 
 I tried the Zope job board but response was virtually nonexistent.
 
 My resume is up on my homepage
 http://sindev.dyndns.org/Home
 
 viva la revolution.
 
 Kapil Thangavelu
 
 ___
 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] Python + COM (from external method)

2000-08-11 Thread Jim Sanford

I had this problem.

If you have Python installed standalone on the machine and a copy under Zope, you need 
to make sure that the wincomm stuff is in the
python path of the Zope python. You can add the proper dirs to the path in z2.py.)

 __

  Jim Sanford
  .   Database Engineer
 / \  /   Accelerated Technology, Inc.
/   / 720 Oak Circle Drive East
   /  /  \Mobile, AL 36609
  / / \   Voice: 334-661-5770  fax: 334-661-5788
 / \  E-Mail: [EMAIL PROTECTED]
  Web: http://www.atinucleus.com

 Nucleus.  All You NEED in an RTOS.  Royalty Free
 __


- Original Message -
From: Steinar Rune Eriksen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 11, 2000 6:49 AM
Subject: [Zope] Python + COM (from external method)


How come this fails...
--
import win32com.client
oOleObj = win32com.client.Dispatch("DSOleFile.PropertyReader")
--

when run from Zope (within and External Method) when it works from Python
standalone on the same machine ?


SRE





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

Admin
Orion System AS
**

___
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] need some basic help

2000-08-11 Thread Dan Huston

Hello Folks,

So I downloaded Zope and installed it on my sun box and on my nt box.  I
can go to the manage page as the admin and it all looks like it installed
fine.

So I tried to create a folder but the superuser cannot own a folder it
says.  So I figure I can create a folder in the zope dir as one of the
users I have defined, but then how do I add objects to that folder?  The
only login that works at the manage page is the admin password.  Is there
a different page for users to go to that is similar to the manage page?  I
can believe that the admin would have to add all of the objects as that
would seem un-Zope-ish.  I have looked at a lot of docs but they were
either so basic as not to address hands on stuff (devshed) or advanced
enough that it was assumed that you could do this simple task.  Can
someone straighten me out?

Thanks,
Dan


___
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] need some basic help

2000-08-11 Thread Jim Sanford

As superuser add a user and give him the manager role.

- Original Message - 
From: Dan Huston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 11, 2000 11:09 AM
Subject: [Zope] need some basic help


Hello Folks,

So I downloaded Zope and installed it on my sun box and on my nt box.  I
can go to the manage page as the admin and it all looks like it installed
fine.

So I tried to create a folder but the superuser cannot own a folder it
says.  So I figure I can create a folder in the zope dir as one of the
users I have defined, but then how do I add objects to that folder?  The
only login that works at the manage page is the admin password.  Is there
a different page for users to go to that is similar to the manage page?  I
can believe that the admin would have to add all of the objects as that
would seem un-Zope-ish.  I have looked at a lot of docs but they were
either so basic as not to address hands on stuff (devshed) or advanced
enough that it was assumed that you could do this simple task.  Can
someone straighten me out?

Thanks,
Dan


___
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] retrieving data from REQUEST.form

2000-08-11 Thread jesse

I am creating a program, yet again.  How this works is, 

a zope factory calls a form, which submits data from a textarea to a DTML document.  
I want this DTML document to take the data from the form and display it on multiple 
lines. For instance: 

If a person fills out the textarea like so:

First line
second line
third line

I want the DTML document to print out: 

First line
second line
third line

The only problem is, when the textarea submits to the document, (lets say the 
textarea is called list), it submits it as a dictionary.  That means all the data is 
on a SINGLE STRING.  So the data from the form looks like this. 

dtml-var "REQUEST.form" = 
{'list': 'first line/015/012second line/015/012third line'}

the /015/012 represent the line breaks.  

Seeing this, i used the replace function in zope, trying to replace the line breaks 
with br, which would be accepted by html.  however, whenever you try and access the 
information in the form as a string...

dtml-var "REQUEST.form['list']" 

it comes out with 

line one line two line three 

All the line breaks dissapear! So there is nothing to replace! Does anyone have any 
ideas how I could solve this problem?  


 

___
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] Zope - long running process

2000-08-11 Thread J. Atwood

There is a switch in z2.py that allows you to point to a PID file. It will
automatically restart your Zope installation once it goes down (if).

Like so... (start script)

___
#! /bin/sh
reldir=`dirname $0`
PYTHONHOME=`cd $reldir; pwd`
export PYTHONHOME
exec /usr/local/zope/bin/python \
 $PYTHONHOME/z2.py \
 -w80 -Z /usr/local/zope/var/Z2.pid "$@"

___

It is the -Z /usr/local/zope/var/Z2.pid part.

Do a more on your z2.py and check out all the options.

J

 From: George [EMAIL PROTECTED]
 Organization: OK Studio
 Date: Sat, 12 Aug 2000 01:10:53 +1000
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zope - long running process
 
 Could someone please explain how to make sure ZOPE does not stop working
 and if it does then it restarts again? My platform is FreeBSD 4.0
 -stable. Do I use CRON ? Do I turn the debug option off to detach ZOPE
 from the terminal it was started from?
 
 Regards,
 George
 [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 )
 
 


___
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] retrieving data from REQUEST.form

2000-08-11 Thread Patrick Lewis

On Fri, Aug 11, 2000 at 01:08:48PM -0400, jesse wrote:
 I am creating a program, yet again.  How this works is, 
 
 a zope factory calls a form, which submits data from a textarea to a DTML 
document.  I want this DTML document to take the data from the form and display it on 
multiple lines. For instance: 
 
 If a person fills out the textarea like so:
 
 First line
 second line
 third line
 
 I want the DTML document to print out: 
 
 First line
 second line
 third line
 
 The only problem is, when the textarea submits to the document, (lets say the 
textarea is called list), it submits it as a dictionary.  That means all the data is 
on a SINGLE STRING.  So the data from the form looks like this. 
 
 dtml-var "REQUEST.form" = 
 {'list': 'first line/015/012second line/015/012third line'}
 
 the /015/012 represent the line breaks.  
 
 Seeing this, i used the replace function in zope, trying to replace the line breaks 
with br, which would be accepted by html.  however, whenever you try and access the 
information in the form as a string...
 
 dtml-var "REQUEST.form['list']" 
 
 it comes out with 
 
 line one line two line three 
 
 All the line breaks dissapear! So there is nothing to replace! Does anyone have any 
ideas how I could solve this problem?  
 
A couple of questions:

- You say that dtml-var "REQUEST.form['list']" returns 
  line one line two line three
  Is that in your browser window, or did you view the source html?

- Does dtml-var "_.string.replace(REQUEST.form['list'], '\015\012',
'br')"  work?

-- 
Patrick Lewis [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] ZClass inheriting from image question

2000-08-11 Thread Steve Alexander


Kapil wrote:
  I want to change the default way the ZClass renders it's information. I
  want more than simply a picture so I crated a new method "index_html" in
  my ZClass.
 
  My question is: How do I display the picture from this index_html method?


http://www.zope.org/Members/lalo/Renderable-ZClass

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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] retrieving data from REQUEST.form

2000-08-11 Thread Kapil Thangavelu

jesse wrote:
 
 I am creating a program, yet again.  How this works is,
 
 a zope factory calls a form, which submits data from a textarea to a DTML 
document.  I want this DTML document to take the data from the form and display it on 
multiple lines. For instance:
 
 If a person fills out the textarea like so:
 
 First line
 second line
 third line
 
 I want the DTML document to print out:
 
 First line
 second line
 third line
 
 The only problem is, when the textarea submits to the document, (lets say the 
textarea is called list), it submits it as a dictionary.  That means all the data is 
on a SINGLE STRING.  So the data from the form looks like this.
 
 dtml-var "REQUEST.form" =
 {'list': 'first line/015/012second line/015/012third line'}
 
 the /015/012 represent the line breaks.
 
 Seeing this, i used the replace function in zope, trying to replace the line breaks 
with br, which would be accepted by html.  however, whenever you try and access the 
information in the form as a string...
 
 dtml-var "REQUEST.form['list']"
 
 it comes out with
 
 line one line two line three
 
 All the line breaks dissapear! So there is nothing to replace! Does anyone have any 
ideas how I could solve this problem?
 


if you're inserting data with a dtml-var you can take advantage of
Zope's formating options one of which happens to be newline_to_br

try
dtml-var "REQUEST.form['list']" fmt=newline_to_br

Kapil

___
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] retrieving data from REQUEST.form

2000-08-11 Thread Nick Garcia

jesse wrote:
 
 dtml-var "REQUEST.form['list']"
 
 it comes out with
 
 line one line two line three
 
 All the line breaks dissapear! So there is nothing to replace! Does anyone have any 
ideas how I could solve this problem?

The line breaks don't disappear, they just don't mean anything in HTML. 
You can still replace them.  You can do dtml-var
"_.string.replace(REQUEST.form['list'], '\n', 'br')" and it should do
what you want.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.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] Broken Links and Orphan Checking

2000-08-11 Thread Darin Lee

Greetings,

Is there any way within Zope to parse HTML to look for broken links and orphaned 
files? The site I am building will have many Zope dynamic componants, but also a good 
share of wrapped static HTML pages maintained by content contributors in 
Frontpage/Dreamweaver. I know that orphaned files and broken links *will* become a 
problem over time.

Does anyone know of a good way to handle this?

Thanks,
-Darin M. Lee



Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[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] Re: Help with installing PoPy ZPoPyDA

2000-08-11 Thread Stephen Nosal

Folks -

Federico sent me a patch for the popy-1.3.3 source. I needed it to tell it where the 
postgresql libraries are..if you need it please let me know and I will send it along. 
You may also find it in the archives from earlier this month.

- Steve

On Fri, 11 August 2000, "Hung Jung Lu" wrote:

 
 --- In [EMAIL PROTECTED], ed colmar [EMAIL PROTECTED] wrote:
 Hi, I downloaded the current versions of ZPoPyDA, and PoPy from
 www.mixadlive.com, and I cannot figure out how to execute the installation.
 
 Run the autogen.sh script first, instead of the ./configure.
 
 Could you send an e-mail to Eric (one of the authors) [EMAIL PROTECTED]? So 
 things can get fixed properly in the documentation. I've already told him 
 the problem, but in all freeware things, the authors need to be reminded of 
 the problems. After two different users mentioning the same problem, usually 
 it gets fixed. :)


__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!

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

2000-08-11 Thread Mathias Bengtsson

Does anybody know how the login is handled by GUF. I use cookie
authentication and I get the loginptomt when I try to access a page that
has authenticate permissions. But when I try to login I don't know how
to get the user logged i.e I don't know how to set the cookie. Can
anybody help me ?

/Mathias Bengtsson


___
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] packing issue

2000-08-11 Thread ethan mindlace fremen

i just packed zope.org, and we're getting the "oversized int" error.

I am correcting this.

Thanks for your patience,
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate 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] Using Zope as App Server for non http-Protocols

2000-08-11 Thread Philipp Auersperg



We want to (mis)use zope as an application server servicing a proprietary 
non-http protocol 
for transmitting compressed data.

Our idea is a specially written client that connects on a proprietary port 
to zope where 
a special product is listening and serving the request.

Our question:

How can I implement a product listening on a specific port and servicing 
requests and sending back binary (in our case compressed) data.
But the product should of course be able to use the infrastructure of Zope 
(ODB,External methods,ZSQL methods...)

Another question is how does the authentification work for such a non-http 
connection.

Any hints?
Thanks in advance

Philipp Auersperg



Re: [Zope] retrieving data from REQUEST.form

2000-08-11 Thread Bill Anderson

Nick Garcia wrote:
 
 jesse wrote:
 
  dtml-var "REQUEST.form['list']"
 
  it comes out with
 
  line one line two line three
 
  All the line breaks dissapear! So there is nothing to replace! Does anyone have 
any ideas how I could solve this problem?
 
 The line breaks don't disappear, they just don't mean anything in HTML.
 You can still replace them.  You can do dtml-var
 "_.string.replace(REQUEST.form['list'], '\n', 'br')" and it should do
 what you want.

dtml-var "REQUEST.form['list']" newline_to_br

Is much simpler. :)
Just out of caution, I would not use 'list' as a variable, though.

Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] Using Zope as App Server for non http-Protocols

2000-08-11 Thread Chris McDonough

Phillipp,

First, design your system.

Then write the very basics of what you need in Python first using
whatever third-party binaries you need to, leaving the methods which use
Zopish features (like ZSQL methods, ODB, etc) as stubs.  Then after
you're done, and it works, you can wrap it in a Zope Product.  There's
not much information on how to do this, I'm working on material for a
Product Developer's Guide now.

Authentication should probably be handled outside Zope in your Python
code.  Unless it's not.  :-)


-Original Message-
From: Philipp Auersperg [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 5:31 PM
To: [EMAIL PROTECTED]
Subject: [Zope] Using Zope as App Server for non http-Protocols


We want to (mis)use zope as an application server servicing a
proprietary non-http protocol 
for transmitting compressed data.

Our idea is a specially written client that connects on a proprietary
port to zope where 
a special product is listening and serving the request.

Our question:

How can I implement a product listening on a specific port and servicing
requests and sending back binary (in our case compressed) data.
But the product should of course be able to use the infrastructure of
Zope (ODB,External methods,ZSQL methods...)

Another question is how does the authentification work for such a
non-http connection.

Any hints?
Thanks in advance

Philipp Auersperg

___
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] Xron Product Screenshots [was: Importable Xron]

2000-08-11 Thread Loren Stafford


 I have in a recent email to the mailing list urged all Product creators to
 include screenshots and/or demos of their products.


I'd like to put some screenshots the management pages in the README.txt of
Xron where they would illustrate that text that explains those pages.

Can you point to any examples of other products that do this effectively.

Authors often (well I do anyway) use the same README.txt for the README tab
of  Control Panel / Products and for the "Release Information" link on the
www.zope.org/Members  product page. Being able to use the same file makes
documentation easier for developers, and that's important; if documentation
is needlessly hard, it won't get done.

However, if I create image hyperlinks that work on
http://www.zope.org/Members/lstaffor/Xron/README.txt , they won't work in
the context of Control Panel / Products. I don't see to make links work
correctly in both places. Does anyone know how?

-- Loren


___
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] Can't get ZClient to work, zope 2.2.0

2000-08-11 Thread Bill Welch

hit http://zope.carbonecho.com/forum/sepServe to see the error
('expecting read-only buffer...')

here's the external function:

from ZPublisher import Client

def ServePHP(url='http://www.yahoo.com', username='bill', password='xyz'):
print 'Sep Serving ' + str(url) 
return Client.call(url, username, password) [1]






___
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] Zope - long running process

2000-08-11 Thread bak @ kedai



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of J.
 Atwood
 Sent: Saturday, August 12, 2000 1:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope] Zope - long running process


 There is a switch in z2.py that allows you to point to a PID file. It will
 automatically restart your Zope installation once it goes down (if).

 Like so... (start script)

 ___
 #! /bin/sh
 reldir=`dirname $0`
 PYTHONHOME=`cd $reldir; pwd`
 export PYTHONHOME
 exec /usr/local/zope/bin/python \
  $PYTHONHOME/z2.py \
  -w80 -Z /usr/local/zope/var/Z2.pid "$@"

 ___

 It is the -Z /usr/local/zope/var/Z2.pid part.

 Do a more on your z2.py and check out all the options.

i've tried this, with 2.1.x and 2.2.0; but i'm not sure it works well.
there are times when my zope hangs, and i need to stop and start manually.
it may be my programming.  not too sure though.  what are others experience?

  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] Fw: [Zope] Can't get ZClient to work, zope 2.2.0

2000-08-11 Thread Loren Stafford



 From: "Bill Welch" [EMAIL PROTECTED]
 
 
  hit http://zope.carbonecho.com/forum/sepServe to see the error
  ('expecting read-only buffer...')
  
 
 This is a known bug. You need to install this patch to Client.py:
 
  #h.connect((self.host, self.port))
   h.connect(self.host, self.port)
 
  Restart Zope after installing.
 
 See http://classic.zope.org:8080/Collector/1480/view
 
 -- Loren
 
 
 


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