[Zope] Number of zope processes on Linux and OpenBSD

2000-07-06 Thread Ragnar Beer

Howdy! I have a question concerning the number of running zope 
processes: I used to run Zope under Linux and there was always more 
than a handful of zope processes running. Now I switched to OpenBSD 
and there is only one. How comes? I guess the more zope processes I 
have running the more requests I can satisfy?

--Ragnar

___
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] Problems shutting down Zope

2000-07-06 Thread Firestar

--Original Message--
From: Chris McDonough <[EMAIL PROTECTED]>
To: Firestar <[EMAIL PROTECTED]>
Sent: July 7, 2000 5:05:55 AM GMT
Subject: Re: [Zope] Problems shutting down Zope


>This is a 'normal' message.  Zope 2.2 releases suppress the
>error message on shutdown.

Phew...for once, i thought my linux distribution or zope installation is
broken:)

>Not sure what's up with the tutorial.  You may want to try the
>latest 2.2 beta release as the tutorial comes preinstalled.

Well, this is the error message i got:

-
Error Type: KeyError
Error Value: ELVIS_SIGHTINGS

Traceback (innermost last):
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in
publish
File /usr/local/Zope-2.1.6/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in
publish
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: addTutorial)
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in
call_object
(Object: addTutorial)
File
/usr/local/Zope-2.1.6/lib/python/Products/ZopeTutorial/TutorialTopic.py,
line 176, in addTutorial
File /usr/local/Zope-2.1.6/lib/python/OFS/DTMLMethod.py, line 150, in
__call__
(Object: setup)
File /usr/local/Zope-2.1.6/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
(Object: setup)
File /usr/local/Zope-2.1.6/lib/python/DocumentTemplate/DT_In.py, line 691,
in renderwob
(Object: sample_data)
File /usr/local/Zope-2.1.6/lib/python/DocumentTemplate/DT_Util.py, line 335,
in eval
(Object: insert(_.getitem('sequence-item')))
(Info: insert)
File , line 0, in ?
File /usr/local/Zope-2.1.6/lib/python/Shared/DC/ZRDB/DA.py, line 430, in
__call__
(Object: insert)
File /usr/local/Zope-2.1.6/lib/python/Products/ZGadflyDA/db.py, line 178, in
query
File /usr/local/Zope-2.1.6/lib/python/Products/ZGadflyDA/gadfly/gadfly.py,
line 349, in execute
File /usr/local/Zope-2.1.6/lib/python/Products/ZGadflyDA/gadfly/sqlmod.py,
line 596, in relbind
File /usr/local/Zope-2.1.6/lib/python/Products/ZGadflyDA/gadfly/gfdb0.py,
line 206, in get_for_update
File /usr/local/Zope-2.1.6/lib/python/Products/ZGadflyDA/gadfly/gfdb0.py,
line 1051, in __getitem__
KeyError: (see above)

--

If anyone has tried out the tutorial on Zope 2.1.6 and manage to solve this
problem, pls tell me!:)

regards,
firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


___
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] Problems shutting down Zope

2000-07-06 Thread Chris McDonough

This is a 'normal' message.  Zope 2.2 releases suppress the error
message on shutdown.

Not sure what's up with the tutorial.  You may want to try the latest
2.2 beta release as the tutorial comes preinstalled.

Firestar wrote:
> 
> Hi, i have just installed Zope-2.1.6 on a linux server. Starting and
> stopping Zope from command line - no problem, but when i chose to Shutodwn
> from the Zope Control Panel, it complained of an error (printed below):
> 
> ---
> Traceback (innermost last):
> File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in
> publish_module
> File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in
> publish
> File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in
> publish
> File /usr/local/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: manage_shutdown)
> File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in
> call_object
> (Object: manage_shutdown)
> File /usr/local/Zope-2.1.6/lib/python/App/ApplicationManager.py, line 330,
> in manage_shutdown
> (Object: ElementWithAttributes)
> SystemExit: 0
> --
> 
> I also tried installing the Zope Tutorial, but adding the product was not
> successful. Is the tutorial still "raw" and may be troublesome to install?
> 
> Thanks in advance from a newbie.
> 
> regards,
> firestar
> 
> __
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
> 
> ___
> 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] Stability - can you give us some advice?

2000-07-06 Thread David Trudgett

At 2000-07-07 01:50 -0300, [EMAIL PROTECTED] wrote:

>Hi,
>I'm new to this list (to Zope too!)and I'm really impressed with its traffic.
>This show us that this project is in active development.
>In our company we are currently working to create a Web site with lots
>of dynamic content, database access, webmail, etc..  so we decided to try 
>Zope.
>Although it's lack of documentation ( this would not be fair, with a search
>engine we can dig out lots of useful info from the web) we experienced a
>very fast development cycle. Now we're concerned about its stability. We
>are almost finishing the first stage of project and some times Zope
>hangs. It was  working ok, and then, all of a sudden, it just stops answers
>requests. Last time it happend we changed a DTML Method to a DTML Document
>and it worked again (if you like i'll try to tell you exactly what was 
>happenning).
>So, I'd like some advice to make it more stable. ( or tell me what i might
>be doing wrong)

Funny you should mention that. We just had a similar thing happen to us 
this morning. We have an installation of Zope 2.1.6 running on Red Hat 
Linux 6.0 on an old 486/66 machine (a prototype serving some intranet 
content). We aren't doing any database connections on it (through Zope, 
that is), but we are running Squishdot (which is the main application in 
terms of usage on this particular machine). Zope is running behind Apache 
1.3.9, and I noticed that multiple instances of Zope.cgi started up to 
service incoming requests, but apparently Zope wasn't responding. I just 
restarted Apache and everything was fine again.

Is this a known problem with Zope that has been addressed in 2.2?

Thanks.

David Trudgett


___
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] Problem calling SESSION object

2000-07-06 Thread Anthony Baxter

Ugh. This is a stupid bug on my part. Upgrade to 0.2.9

Anthony

>>> [EMAIL PROTECTED] wrote
> Hi All,
> 
> Need Help.
> 
> I'm currently using SQLSession v 0.2.3, with access database ( I had
> changed the "value" filed in session_data to item_value and also all sql
> statements that refer to it).
> 
> I had no problem generate the session id, but however, I had problem
> calling session object after I insert it into session_data.
> 
> I got an error when calling the , i got this :
> 
> 
>  Zope Error
> 
>  Zope has encountered an error while publishing this resource.
> 
>  Error Type: NameError
>  Error Value: upper
> 
> 
> 
> 
> ___
> 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 )
> 

-- 
Anthony Baxter <[EMAIL PROTECTED]>   
It's never too late to have a happy childhood.

___
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 calling SESSION object

2000-07-06 Thread wai

Hi All,

Need Help.

I'm currently using SQLSession v 0.2.3, with access database ( I had
changed the "value" filed in session_data to item_value and also all sql
statements that refer to it).

I had no problem generate the session id, but however, I had problem
calling session object after I insert it into session_data.

I got an error when calling the , i got this :


 Zope Error

 Zope has encountered an error while publishing this resource.

 Error Type: NameError
 Error Value: upper




___
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] Patch to DateTime.py

2000-07-06 Thread Curtis Maloney

Greetings,

In my current project, I have to print a lot of dates.  Fine, not a 
problem... _.DateTime().strftime() is just the method, right?

Wrong.

The people who want this site want the local time, not UTC+0 that strftime 
enforces.

So, I created a tiny patch which adds  _.DateTime().strfltime(), which works 
identically, except it passes LOCALTIME instead of GMTIME.

It's tiny, it's simple, but it's REALLY HANDY!

Have a better one,
Curtis Maloney.




1183a1184,1185
> def strfltime(self, format):
>   return strftime(format, localtime(self.timeTime()))



[Zope] Stability - can you give us some advice?

2000-07-06 Thread tacio

Hi,
I'm new to this list (to Zope too!)and I'm really impressed with its traffic.
This show us that this project is in active development.
In our company we are currently working to create a Web site with lots
of dynamic content, database access, webmail, etc..  so we decided to try Zope.
Although it's lack of documentation ( this would not be fair, with a search
engine we can dig out lots of useful info from the web) we experienced a
very fast development cycle. Now we're concerned about its stability. We
are almost finishing the first stage of project and some times Zope
hangs. It was  working ok, and then, all of a sudden, it just stops answers 
requests. Last time it happend we changed a DTML Method to a DTML Document
and it worked again (if you like i'll try to tell you exactly what was happenning). 
So, I'd like some advice to make it more stable. ( or tell me what i might
be doing wrong)

Our environment:

   OS: Debian GNU/Linux 2.2 (Potato) - Kernel 2.2.16
   Plataform: Dual PentiumIII - ASUS motherboard - scsi Adaptec AIC-7892)
   Python: got from Debian -  python-base_1.5.2-10_i386.deb
   Zope: got from Debian -  zope_2.1.6-5_i386.deb
   DB: Postgresql V7.0.2 - compiled and installed by hand -> tools from Debian, 
(make,gcc,..)
   DB-DA:  zope-pygresqld 0.3rjr2-1
   Front-End: Apache 1.3.12 + mod_ssl + mod_proxy + mod_rewrite
  (with mm-1.1.3 Shared Memory Library ) 
  Install type : DSO - Dynamic shared Object
  (compiled and installed by hand -> tools from Debian, (make,gcc,..)

Some questions: (with stability in mind..)

  1) Should we try Zope 2.2.0b3 instead of 2.1.6 ?
  2) Should we avoid using packaged versions of Zope?
  3) Should we try ZPoPyDA as a DA to Postgresql?
  4) Could you give us some advices on good DTML coding: what should
 we avoid doing, what is a must, for example, whether or not (or when)
 to generate urls for objects (http://www.zope.org/Members/jim/ObjectURLs)

Thanks a lot for your attention,

Tacio AGSantos
[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] Problems shutting down Zope

2000-07-06 Thread Firestar

Hi, i have just installed Zope-2.1.6 on a linux server. Starting and
stopping Zope from command line - no problem, but when i chose to Shutodwn
from the Zope Control Panel, it complained of an error (printed below):

---
Traceback (innermost last):
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 179, in
publish
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 165, in
publish
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: manage_shutdown)
File /usr/local/Zope-2.1.6/lib/python/ZPublisher/Publish.py, line 102, in
call_object
(Object: manage_shutdown)
File /usr/local/Zope-2.1.6/lib/python/App/ApplicationManager.py, line 330,
in manage_shutdown
(Object: ElementWithAttributes)
SystemExit: 0
--

I also tried installing the Zope Tutorial, but adding the product was not
successful. Is the tutorial still "raw" and may be troublesome to install?

Thanks in advance from a newbie.

regards,
firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


___
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] Is Zope slow?

2000-07-06 Thread Luke Tymowski

Hello,

>I'm considering using Zope as the development tool for my next web 
>project. However, I read from a recent benchmark test (from Qube, i think) 
>that Zope(running thru Zserver?) is much SLOWER than Apache and 
>AOLserver.  Is that true? To all Zope users and 'guru's, what is yr 
>experience using Zope?

I run the QubeQuorner weblog where those numbers came from.

Zope isn't slow. It's slower than Apache serving static pages. But Zope is 
dynamic. I haven't yet had time to do proper dynamic comparisons between 
the various servers.

I run a few Zope sites. And I'm adding more Zope sites. I wouldn't do that 
if I thought it was too slow.

There is a lot involved in making a site faster or slower. Adding a few 
graphics to your web page is going to make it slower than an all-text page. 
An all-text page vs a mixed text and graphics page can be almost twice as 
fast. Your connection to the site is going to affect "apparent" 
performance. For example, while I have a cable modem at home, and my Zope 
server sits on a fast T1 (there are slow T1s and fast ones), the connection 
in the evenings is too slow for me use my server. That's @Home's fault, not 
Zope's. And our T1 will fill up well before Zope runs out of steam on my box.

Technocrat.net is a Zope site. They were Slashdotted and survived without 
any apparent problems. And they were running Zope on a Pentium 120! I 
believe they upgraded to a PII-450 after that episode, just to be safe.

I have a list of Pystone benchmarks on my QQ site too:
http://weblogs.userland.com/qube/stories/storyReader$289

A PIII-850 gives tremendous Python performance, which should translate to 
impressive Zope numbers too. Zope.org, however, doesn't run on nearly the 
fastest hardware available, and it rarely seems slow to me.

Luke


___
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] 2.2b3 hangs a lot

2000-07-06 Thread Bak @ kedai


> 
> If you look at the server logs when it hangs, do you see any 
> pattern as to what was requested when this happens? I haven't 
> been hearing of any hanging issues with the 2.2 betas, which 
> makes me suspect that something specific to this site may be 
> in play here.
> 
> The fact that it comes back to life on its own after a while 
> makes me think that this is either a very strange system 
> issue or tied up with something that has a timeout (for ex.
> is it possible that a query is trying to run, timing out 
> against the postgres database?) If the PygresSql DA is not 
> fully thread-safe then I could imagine this as a possiblity.
> 
hi Brian.
i spent a few days trying out Chris's howto 
http://www.zope.org/Members/mcdonc/HowTos/DEBUG-LOG
after a while i see that requests not completed are not only from a method
accessing the RDB, but also from plain html file call.  here's a snippet

-

request 152393080 did not end
B 152393080 2000-07-07T02:25:47 GET /kk/
I 152393080 2000-07-07T02:25:47 0
A 152393080 2000-07-07T02:28:32 200 0
 
request 149809744 did not end
B 149809744 2000-07-07T02:28:33 GET /kk/msg1.html
I 149809744 2000-07-07T02:28:33 0
 
request 143300240 did not end
B 143300240 2000-07-07T01:17:45 GET /kk/image/kflat.gif
I 143300240 2000-07-07T01:17:45 0
A 143300240 2000-07-07T01:17:45 200 0
 
request 144523968 did not end
B 144523968 2000-07-07T02:28:25 GET /kk/image/knew.gif
I 144523968 2000-07-07T02:28:25 0  
===

these are all normal html files.  no method in most of them.  does this happen
when clients stops the transfer midway?  or does it have something to do with
how zserver handles requests?

i'm not too sure what to look at now.  advice appreciated!

thanks



> Brian Lloyd[EMAIL PROTECTED]
> Software Engineer  540.371.6909  
> Digital Creations  http://www.digicool.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 )
-- 
--
http://www.kedai.com.my/kk
Am I Evil?


___
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] newbie questions

2000-07-06 Thread R. David Murray

On Fri, 7 Jul 2000, David Trudgett wrote:
> I don't understand this advice. Couldn't the file change while being read? 
> Wouldn't a better way be to pack the database and use the Data.fs.old file 
> as the backup?

If you are a belt-and-suspenders type, sure .

Data.fs only gets appended to, and Zope is smart enough to
ignore incomplete transactions on the end of the file when
it starts up.  So the database is *always* in a consistent
state on disk from Zope's point of view, making it safe to
back it up by just copying the live Data.fs.

--RDM


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




Re: [Zope] newbie questions

2000-07-06 Thread Chris McDonough

AFAIK, it would be a bad idea a) if writes were not appends and b) if
records written to the FileStorage were not written atomically.  But
neither is the case, so it's safe to just copy it without shutting it
down.  The only time this may not be the case is if it were copied
during a pack operation.

David Trudgett wrote:

> I don't understand this advice. Couldn't the file change while being read?
> Wouldn't a better way be to pack the database and use the Data.fs.old file
> as the backup?
> 
> David Trudgett

___
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] Is Zope slow?

2000-07-06 Thread Bill Anderson

Curtis Maloney wrote in part:

> A friend of mine was a hardcore PHP nut, before I introduced him to Zope, and
> was amazed at how simple it made work.  I think the thing that slowed his
> learning of zope the most was often expecting solutions to problems to be
> complex.


I'll second that!

I recently spent about two weeks trying to figure out a site I thought
would be difficult, even in Zope (converting from [*ugh*] Broken K
Shell). Once I untangled my brain and realized how easy it would be, it
took less than an hour to get the foundation done. Now I'm just playing
with GUI.

Bill

-- 
"Linux: the operating system with a CLUE...
Command Line User Environment".

seen in a posting on comp.software.testing

___
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] ANN: Forthcoming Zope Book

2000-07-06 Thread Bill Anderson

Graham Chiu wrote:

[...]

> >We're excited about the book and think that it will fill an important
> >hole the current official Zope docs.
> >
> >As soon as a content license is chosen we'll make our rough drafts
> >available.
> >
> >-Amos
> 
> Why not invite authors of popular/important products to contribute their
> own chapters?
> 
> Or, is this too radical 


I think it is a great idea. Give each of them an 'appendix' describing
how they implemented their product, and why they chose that method.


-- 
"Linux: the operating system with a CLUE...
Command Line User Environment".

seen in a posting on comp.software.testing

___
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] Unable to upload images from client to server

2000-07-06 Thread Kelvin Cheong


Hello All!

I have this problem with "UPLOADING".

In my HTML form (DTML-embedded-Document) I have data and images to insert
into a mySQL DATABASE. Therefore I'm calling SQL statements from my DTML
METHOD.

However, it seems the SQL insert command does not allow LOAD_FILE procedure
as does the SQL update command e.g.: 

UPDATE table_name 
SET blob_column=LOAD_FILE('full_path_of_file') WHERE
table_column='table_column value'

So I had to resort to using TWO separate SQL methods : 
1) to insert the "data" alone into the database first, from the form; 
2) then another to insert the image of the same form using the SQL "update"
command, verified my the data record's unique id.

All this works fine but this method does not work with the
<...ENCTYPE="multipart/form-data"...> value at the html form header.
Instead it only works with
<...ENCTYPE="application/w-xxx-form-urlencoded"...>. If I use
"multipart/form-data" it will enter the string of the command
LOAD_FILE('...file...') instead of the actual image contents. Why is this?

This is only one small part which I'm puzzled about as this method would
only allow images on the server's harddisk to be uploaded. The main concern
is UPLOADING from the client.

Having mentioned so, the next problem I'm facing is uploading the file onto
the Zope Server from the client. Having searched on the net, it appears
that I will have to use CGI's on my server side to temporarily grab the
files contents and place it somewhere. Is there anyway to use DTML without
the involvement of external CGI's?

Also, it seems that if I had to do this on Zope, it will require me to use
Python. Which of course sounds hard.

Then the questions arise regarding CGI's (IF IT REALLY IS REQUIRED): 
1) How on earth do I do this?; 
2) What if there were multiple users uploading files at the same time, then
what happens to the single temporary file which stores the uploaded files'
contents. 
3) If I were to use a /cgi-bin/... how will that relate to where ZOPE is
installed, in other words, would the directory structures get confusing?

I'm not a hopeless programmer but neither am I close to even "quite good".
Learning won't be a problem, but I'll need the answers quick, as I do not
have the time in my hands. Can anyone please help me out?

I've looked in discussion forums and the DTML reference, as I have said I'm
practically a beginner programmer, and was unable to understand even half
of what had been posted.

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


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




Re: [Zope] newbie questions

2000-07-06 Thread David Trudgett

At 2000-07-06 22:23 -0400, Chris McDonough <[EMAIL PROTECTED]> wrote:


>To back up the ZODB, just copy the Data.fs file in the var directory.
>You may safely do this while Zope is running.  To restore, reinstall
>Zope and all the products you're using and copy the Data.fs into the var
>directory.

I don't understand this advice. Couldn't the file change while being read? 
Wouldn't a better way be to pack the database and use the Data.fs.old file 
as the backup?

David Trudgett


___
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] Which PostGreSQL DA should I use?

2000-07-06 Thread Bak @ kedai

On Fri, 07 Jul 2000, Eric L. Walstad wrote:
> OK, I am thinking about going from MySQL to PostgreSQL for its transactions
> and subqueries.  I am curious which DA I should use and why.  I see that I
> can choose from:
> 
> 1. SQLRelay
> 2. ZPoPyDA
> 3. ZPyGreSQLDA
> 
> Which are you using and why did you choose it over the others?
> 
i have been asking the same Q too.  i am current;y using ZPygreSQLDa, and have
been from the start.  i think there's no more development done on this  DA (
imight be wrong though).

i wanted to try PoPy, but the last time i checked, i can't get the PoPy tar
ball.  this is actively maintained, i think

SQLRelay, i have compiled and installed, but i can't figure out how to use it. 
i cant start the listener without an error.( can't bind something).  and i'm
not too sure how how the connect string looks like if i have a user with no
password.  but i think this may be the best solution, since we can specify the
connection pool, and have a cache for results too.

> Thanks for your time.
> 
> Eric.

what are the rest using?  has anybody successfully use SQLRelay?  how 'bout a
how to? :)

thanks > 
> 
> ___
> 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 )
-- 
--
http://www.kedai.com.my/kk
Am I Evil?


___
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] newbie questions

2000-07-06 Thread Chris McDonough

Hi Frank,

It sounds like your SourceSafe tie in could potentially be a fairly
complex undertaking.  Amos Latteier wrote an example COMObject product
that will show you the mechanics of utilizing COM objects from Zope. 
This might help.  And though I know you don't want to VC Zope objects,
you might be interested in Steve Spicklemire's CVSMixin product that
seems to utilize CVS for version control of several kinds of Zope
objects.  You may get tips from both of these products.  Seach Zope.org
for both.

To back up the ZODB, just copy the Data.fs file in the var directory. 
You may safely do this while Zope is running.  To restore, reinstall
Zope and all the products you're using and copy the Data.fs into the var
directory.

HTH,

Chris


Frank McGeough wrote:
> 
> Hi,
> 
> I've setup zope and zwiki to use for internal collaboration. I'm
> having fun and doing some useful stuff without knowing too much or
> appearing too stupid. I've decided to do something more adventuresome
> to learn some more. I'd like to tie in our SourceSafe version control
> system so I could do reports that list what has been checked in since
> a date or label. So I have to get input from the user from this and
> then use SourceSafe com interfaces to gather the data and put it in a
> nice format. Is this a good project for zope? It would be very useful
> for checking progress on projects when I'm off-site because using the
> SourceSafe UI over a modem has horrid performance problems. Along
> those lines would it be possible to use the Zope tree control to mimic
> the SourceSafe project tree stuff so the whole thing could be
> accessible using a modem?
> 
> Also, is there a backup facility for the zodb? I have built a few
> pages using zwiki and I'd like to ensure that they would survive a
> hard disk crash or other nastiness. Thanks.
> 
> Frank
> 
> ___
> 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] RE:How do I merge form & URL vars into sql easily

2000-07-06 Thread Michael Blewett

At 20:39 6/07/2000 -0400, R. David Murray wrote:
>


>Once you generate an output page, the user views it, and then clicks
>again, you have a brand new REQUEST object that can only get values
>from the *new* web page.  Others have been tripped by this, expecting
>the REQUEST fields to automatically carry over from one form to
>the next.  They don't, unless you explicitly put hidden fields into
>your form to store the variables values for the next REQUEST.
>But as long as you are still server side and making DTML calls,
>REQUEST is there.

Maybe I should have mentioned that my bucket gets emptied after each new 
page is requested...just to keep the analogy going...

Thanks for clarifying that - always happy to be corrected, especially if it 
makes things clearer.

  - Michael
~~~
Michael Blewett
Computer Support Mgr - Biological Sciences
Monash University (Clayton Campus)
Victoria Australia 3168

" Can I trade this job for what's behind door #2? "


___
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] calendarTag exception

2000-07-06 Thread Darrell Gallion

Thanks.
Found the mail on this. Upgraded to Beta3 and changed the demo in this way.
Change --> 
To   --> 

Then things started working.
--Darrell


- Original Message - 
From: "Shane Hathaway" <[EMAIL PROTECTED]>
To: "Darrell Gallion" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 5:28 PM
Subject: Re: [Zope] calendarTag exception


> Zope 2.2.0 revealed a bug in CalendarTag.  The maintainer will be fixing
> it shortly.
> 
> Shane
> 



___
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] newbie questions

2000-07-06 Thread Frank McGeough

Hi,

I've setup zope and zwiki to use for internal collaboration. I'm
having fun and doing some useful stuff without knowing too much or
appearing too stupid. I've decided to do something more adventuresome
to learn some more. I'd like to tie in our SourceSafe version control
system so I could do reports that list what has been checked in since
a date or label. So I have to get input from the user from this and
then use SourceSafe com interfaces to gather the data and put it in a
nice format. Is this a good project for zope? It would be very useful
for checking progress on projects when I'm off-site because using the
SourceSafe UI over a modem has horrid performance problems. Along
those lines would it be possible to use the Zope tree control to mimic
the SourceSafe project tree stuff so the whole thing could be
accessible using a modem?

Also, is there a backup facility for the zodb? I have built a few
pages using zwiki and I'd like to ensure that they would survive a
hard disk crash or other nastiness. Thanks.

Frank


___
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:How do I merge form & URL vars into sql easily

2000-07-06 Thread R. David Murray

On Fri, 7 Jul 2000, Michael Blewett wrote:
> trial and error (and guidance from this list), I came up with these 
> conclusions (which I'm sure someone will shoot down if I am wrong):
> 1) The request object you are setting with your REQUEST.set command is like 
> a big bucket that gets passed between one web page and the next when you 
> call it in your DTML. The best thing someone ever showed me was how to view 

Not that you are wrong, but just a bit of clarification for those
people who also haven't quite grasped the stateless nature of
http transactions:  it is probably better to say that the REQUEST
object gets passed (by the DTML machinery invisibly or by calling
dtml methods using the "methodname(_.None,_)" pattern) around
between one *method* and the next.

Once you generate an output page, the user views it, and then clicks
again, you have a brand new REQUEST object that can only get values
from the *new* web page.  Others have been tripped by this, expecting
the REQUEST fields to automatically carry over from one form to
the next.  They don't, unless you explicitly put hidden fields into
your form to store the variables values for the next REQUEST.
But as long as you are still server side and making DTML calls,
REQUEST is there.

--RDM


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




Re: [Zope] calendarTag exception

2000-07-06 Thread Shane Hathaway

Zope 2.2.0 revealed a bug in CalendarTag.  The maintainer will be fixing
it shortly.

Shane

Darrell Gallion wrote:
> 
> Trying to use the calendarTag and get this error.
> I'm using the example code from
> http://yyy.zope.org/Members/judell/CalendarTagExample
> Before I redesign this thing, it seemed I must be doing something dumb.
> I'm using this version Calendar-0.9.13.tar.tgz and Zope-2.2.0b1
> 
> --Darrell
> 
> Error Type: KeyError
> Error Value: BASE1
> 
> Traceback (innermost last):
>  ...
>   File E:\zope\public\lib\python\DocumentTemplate\DT_String.py, line 504, in
> __call__
> (Object: index_html)
>   File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 227,
> in render
>   File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 346,
> in render_dwm
>   File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 374,
> in render_day_
>   File E:\zope\public\lib\python\DocumentTemplate\DT_Util.py, line 263, in
> namespace
>   File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 177,
> in render
> KeyError: (see above)
> 
> ___
> 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] ANN: Forthcoming Zope Book

2000-07-06 Thread Graham Chiu

In article <[EMAIL PROTECTED]>
, Amos Latteier <[EMAIL PROTECTED]> writes
>Hi,
>
>We all know that Zope needs better docs. To this end we've added a help
>system, API docs and a tutorial to Zope 2.2.
>
>Now the important work of replacing the aging guides is job number one.
>
>Michel Pelletier has been diligently working on a Zope book for O'Reilly
>for a number of months. I convinced him to take me on as a co-author and
>turn the book into official Zope documentation. O'Reilly is on board and
>is currently choosing between two different open content licenses. Find
>out the full scoop on the Zope Docs Wiki.
>
>  http://www.zope.org/Wikis/Docs/ZopeBook
>
>We're excited about the book and think that it will fill an important
>hole the current official Zope docs.
>
>As soon as a content license is chosen we'll make our rough drafts
>available.
>
>-Amos

Why not invite authors of popular/important products to contribute their
own chapters?

Or, is this too radical 
-- 
Regards,  Graham Chiu
gchiucompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

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




[Zope] RE:How do I merge form & URL vars into sql easily

2000-07-06 Thread Michael Blewett

Hi Jake,
I originally had trouble coming to grips with the concept of variables and 
forms and passing them from one object to the next. After much testing, 
trial and error (and guidance from this list), I came up with these 
conclusions (which I'm sure someone will shoot down if I am wrong):
1) The request object you are setting with your REQUEST.set command is like 
a big bucket that gets passed between one web page and the next when you 
call it in your DTML. The best thing someone ever showed me was how to view 
in the called document ie.

  insert the line:



into the dtml/method you are trying to call.

If you do that you can see all of the variables that get passed normally as 
part of your REQUEST variable, as well as any that get added to it by your 
form in the act of your POST command in the form. Be prepared  - it is a 
long list! You should be able to see all your form variables in there. If 
you don't then you haven't been doing your form correctly (been there done 
that too!).
The only real 'nasty' I have come across so far id the checkbox - if it is 
unchecked it doesn't post anything to the REQUEST object, and then you need 
to check for it and set it,  if you are using it  to update an SQL database 
(this is the only time I use the command. This is normal behaviour with 
forms and is not the fault of Zope.


Hope this helps...

  - Michael




  > -Original Message-
 > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 > [EMAIL PROTECTED]
 > Sent: Wednesday, July 05, 2000 5:32 PM
 > To: [EMAIL PROTECTED]
 > Subject: [Zope] How do I merge form & URL vars into sql easily
 >
 >
 > I am a new user to Zope and I'm trying to pass data that has been
 > entered into a form (either through GET or POST) into another
 > object.  This object calls a z sql method to insert the form data into
 > the database.  So far, the only way I've found to pass data to the
 > sql is to define arguments for it and then, in the dtml-document (or
 > method) use:
 > 
 > (and it took me long enough to figure THAT out, let me tell you)
 > The problem is that sucks when there are 30 form varibles that
 > need to be inserted into the database.
 >  I would think that there is some way to let the sql method see
 > these varibles that are defined within my document.  Or loop
 > through all URL or form varibles defined and sets all the vars in
 > request. Something to keep from having to write the above dtml 30
 > times.  Thanks.
 >
 > Jake Feasel
 >
~~~
Michael Blewett
Computer Support Mgr - Biological Sciences
Monash University (Clayton Campus)
Victoria Australia 3168

" Can I trade this job for what's behind door #2? "


___
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] Is Zope slow?

2000-07-06 Thread Marco Mariani

On Thu, Jul 06, 2000 at 04:27:22AM -0400, Firestar wrote:


> Well, i do appreciate the 'extra' features that Zope provides,
> but speed is still a matter of concern here. Imagine showing
> my boss "what my website can do" and all those advanced features,
> but it crawls like a snail... 

What are the basic operations your site should go through?
Do you own the hardware?

For instance, if you need a complex task that should be faster, just
write a python extension in C that works on a local filesystem, a
little wrapper and call it from dtml. Like I do with image editing.
You could do with PHP too, but the environment is harsher.


-- 
"This company has performed an illegal operation and will be shut down.
 If the problem persists, contact your vendor or appeal to a higher court."
 - Signal11 on slashdot

___
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] Is Zope slow?

2000-07-06 Thread Marco Mariani

On Thu, Jul 06, 2000 at 04:13:31AM -0400, Firestar wrote:

> Of course if i have time, i will play ard with it and see how good it is.
> Problem is that time is not really on my side and i need to decide on my
> next development tool fast(i have yet to try out other stuff e.g. ASP,
> JSP, Servlet..) I heard that the learning curve for Zope is quite steep,
> plus the documentation is not(?) that comprehensive, compared to e.g.
> PHP. What are your comments though? i may be wrong here...

Of course, the PHP book I have is really nice, phplib is a godsend too,
but I've tried it and I'm here now.

If you take the time to go beyond the "i will do it with external method
in python because that's all I know" stage, you will find at home sooner
or later depending on wether:

 - you already know python (I did)
 - you understand the difference between  and 
 - you understand how to wisely use REQUEST and RESPONSE
 - you don't need complex new products or zclasses
 - you post any doubt here (nice place isn't it?)
 - you give a deep read at the ZSQL documentation
 - you can apply full-time (I couldn't)

given that, most of the howtos and tips are redundant :-)

Of course I'm a newbie, but I'm a confident newbie.
 



-- 
"This company has performed an illegal operation and will be shut down.
 If the problem persists, contact your vendor or appeal to a higher court."
 - Signal11 on slashdot

___
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] calendarTag exception

2000-07-06 Thread Darrell Gallion

Trying to use the calendarTag and get this error.
I'm using the example code from
http://yyy.zope.org/Members/judell/CalendarTagExample
Before I redesign this thing, it seemed I must be doing something dumb.
I'm using this version Calendar-0.9.13.tar.tgz and Zope-2.2.0b1

--Darrell

Error Type: KeyError
Error Value: BASE1

Traceback (innermost last):
 ...
  File E:\zope\public\lib\python\DocumentTemplate\DT_String.py, line 504, in
__call__
(Object: index_html)
  File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 227,
in render
  File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 346,
in render_dwm
  File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 374,
in render_day_
  File E:\zope\public\lib\python\DocumentTemplate\DT_Util.py, line 263, in
namespace
  File E:\zope\public\lib\python\Products\Calendar\CalendarTag.py, line 177,
in render
KeyError: (see above)



___
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] Is Zope slow?

2000-07-06 Thread Curtis Maloney

On Thu, 06 Jul 2000, Firestar wrote:
> Hi, thanks for your comment.
>
> >Absolutely.  Apache is many times faster than Zope. (Don't know >much
> > about AOLserver, but anything with AOL. :)
> >
> >However, Apache can't do squat compared with Zope when it comes >to
> > dynamic content.
>
> Not true. I have been programming using PHP and PERL, and together with
> Apache(DSO) they are quite fast. They do offer sessions tracking,
> authentication, database API + other features. It's just that due to the
> increasing 'hype':) on Zope and the vast array of features that it seems to
> offer, i'm sort of "attracted" by it:)
>
  As I said, compared with Apache, for static content, it is slow.  
However, just like with CGI, PHP, and various other technologies, ZOPE can 
work through Apache.

As I've had to tell many of my friends, once I became a ZOPE convert, Zope 
does not allow you to do anything you can't already do, but it makes those 
things SO much easier. (o8

> Of course if i have time, i will play ard with it and see how good it is.
> Problem is that time is not really on my side and i need to decide on my
> next development tool fast(i have yet to try out other stuff e.g. ASP, JSP,
> Servlet..) I heard that the learning curve for Zope is quite steep, plus
> the documentation is not(?) that comprehensive, compared to e.g. PHP. What
> are your comments though? i may be wrong here...

Well, I find that Zope allows a MUCH quicker development cycle, along with 
various other advantages, such as remote edit of pages from any browser on 
the net.

Yes, the documentation is lacking.  However, IMHO, a competent programmer 
(especially one with a decent grasp of OO) will pick it up quickly with just 
a couple of reference documents.  (The Zope Quick Reference comes to mind :)

A friend of mine was a hardcore PHP nut, before I introduced him to Zope, and 
was amazed at how simple it made work.  I think the thing that slowed his 
learning of zope the most was often expecting solutions to problems to be 
complex.

>
> regards,
> firestar
>
By all means, try it out.  And when you're done, tell us what you think.  
What you like, where you think other technologies win out, and why.  Zope is 
developing quickly, and the features are easy to add because of the open 
nature of the project, and the whole product system.

Have a better one,
Curtis Maloney



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




[Zope] Re: [Zope-Annce] ANN: Forthcoming Zope Book

2000-07-06 Thread Patrick Phalen

[Amos Latteier, on Thu, 06 Jul 2000]
:: Michel Pelletier has been diligently working on a Zope book for O'Reilly
:: for a number of months. I convinced him to take me on as a co-author and
:: turn the book into official Zope documentation. O'Reilly is on board and
:: is currently choosing between two different open content licenses

YES!!! This is the best news I've ever heard. :)

___
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] Error tracing...

2000-07-06 Thread Dieter Maurer

Peter Arvidsson writes:
 > How do I trace errors in Zope? I get the following error message:
 > "Empty entry when integer expected "
 > It gives a hint of the problem but I cant see what value is empty.. how
 > do I control the values? Is there some way to write out variables or do
 > I just have to guess???
The traceback tells you, where the error was detected, as oneone
else already pointed out.


In your case, it seems that the problem was either
detected by ZPublisher or by Z SQL Method.
They have encountered a parameter/form name with
an ":int" suffix. This tells them to convert the
value into an integer. However, in your case,
the value was empty. Your error, "Empty (form) entry, when
integer expected".


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] the "manage_" methods

2000-07-06 Thread Dieter Maurer

Fabio Akita writes:
 > I am trying to realize how the manage_ DTML methods works. The only
 > documentation that I found was a quick reference that just say that the
 > methods exist with simple descriptions as:
 > 
 > manage_addDTMLMethod(id, [title, file, REQUEST, submit])
The name is well chosen.
The method adds a DTML Method to its folder (it is a folder method)
and gives it "id", "title". The content is taken from "file".
The REQUEST probably is used only for a "redirect" after
the operation.


 > But there is no details about how this works, what´s required. Is there any
 > documentation about them? I am trying to do a webpage that can change the
 > content of properties of a folder.
Maybe, you find something in the InterfaceWiki
or in the new 2.2 help system.


If you do not find anything, you can look at the source.
Zope code is quite readable (mostly).



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] Is Zope slow?

2000-07-06 Thread Ben Leslie

> >  -maybe we could discuss network services/hoster_performance?
> 
> This is more of a problem for most people. One evening whilst bored we
> calculated that Zope could happily serve enough people to fill up our
> pipe... so the bottle neck is our connection.
> 
> Mind you we'd had a beer or two so calculations could be flawed.

That sounds about right (with no idea what size pipe you have ;). I also 
was worried about the speed of Zope however after doing the calculations, 
I figured our current Zope server can fill the pipe we have twice so it 
is definately a bandwidth problem.

(And I was sober when doing the calculations ;)

Benno

___
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] ANN: Forthcoming Zope Book

2000-07-06 Thread Eric L. Walstad

YAY! Can't wait to see the new docs!  Thanks!!  -E

___
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] NOTICE: issue with database packing in current Zope releases

2000-07-06 Thread Dieter Maurer

Brian Lloyd writes:
 > > > Jim found a problem with the algorithm for packing the Zope
 > > > database that we wanted to announce so that folks can avoid 
 > > > being bitten by it until the fix is out (in b4).
 > > 
 > > I think this is a candidate for a Hotfix.
 > > 
 > > 2.2 upgrades could be problematic and I think we might continue
 > > to see large numbers of 2.1.6 users until all the products run
 > > happily on it.
 > 
 > Hm - the goal I had for Hotfixes was to address imperative 
 > problems that couldn't really be addressed any other way. I'm 
 > not sure that this _quite_ makes the grade in my opinion (but 
 > I could probably be convinced). For example, a security problem 
 > _demands_ a hotfix-type solution because you can't tell the 
 > crackers out there "dont do that!". In this case, there is 
 > a clear way to avoid the problem that *is* under your control
 > and a clear way to recover in case you forget :)
It definitely is not an issue for me, because my Zope Sites
are still small (I never did pack up to now).

But large Zope sites with lots of temporary objects may need repacking
before they consume too much disk space.

Maybe, a patch would be a compromise.
Sites that need to care can apply the patch. Those that do not,
simply ignore it.
The patch could be announced with the problem report.


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 )




[Zope] Nested dtml-in loops (was: [Zope-dev] SQL-Output)

2000-07-06 Thread Dieter Maurer

Andre Schubert writes:
 >  ... problem with names clashes from nested dtml-in loop ...

Your problem may be generalized:

<-- l1 and l2 are sequences -->


  
<-- here you need to access both components from both the
inner and the outer dtml-in
There may be a name clash between the two (implicite) loop variables
-->
  


You can use renaming to avoid any clashed.
I demonstrate it for "sequence-item".


  
  >

  ...
 <-- the outer loop value -->
<-- the inner loop value -->
  ...

  



If you want to prevent the outer loop value to be called,
you may use "_.getitem('sequence-item')" rathen than just
sequence-item.


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] Sql result searchs with Z Catalog

2000-07-06 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > I need to somehow populate an ZCatalog index with the results of a 
 > Z SQL Method. If you are familiar with ColdFusion, it needs to have 
 > the same functionality as a Verity search on a collection (custom 
 > indexed from a query).  I am having trouble seeing how this might 
 > be accomplished.
You asked this question already several times.
I did not answer, because I do not understand why you may
want to do this.
I cannot imagine why someone wants to emulate a fast relational
search by a (comparatively) slow ZCatalog search.
Thus, I must miss something.


Anyway. ZCatalog is happy to catalog anything that is
URL addressable.
Using direct traversal (--> Z SQL User Guide) you can make
database records URL addressable.

You probably will need an explicit loop over your query
result set and call "catalogObject" for each of them.


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] How do I specify a list element?

2000-07-06 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > I have a list (I think) created this way:
 > 
 > (date = '31-DEC-1999')
 > 
 > 
 > 
 > so now REQUEST['MyList'] should contain 3 elements: 
 > 31 DEC 1999
 > 
 > How, in dtml, do I say "give me the value of the 1st element of MyList" or 
 > the second or third.
 > 
 > I've tried  but I get this error:
 > 
 > Error Type: TypeError
 > Error Value: argument 1: expected read-only character buffer, 
 > Missing found
 > Now I don't know which part this error is refering to, but anyhow I want 
 > this functionality.
I expect that your "date" looks like a string but in fact
is an object.
In this case, your error does not result from the
"MyList[0]" but from th "_.string.split(date,'-')".
Use "_.string.split(_.str(date),'-')", instead.



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 )




[Zope] PoPy-1.2.tar.gz file is missing...

2000-07-06 Thread Eric L. Walstad

The PoPy-1.2.tar.gz file doesn't seem to be available from the
ftp.mixadlive.com site.  Would anyone out there mind emailing me the file?

Thanks,

Eric.


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

2000-07-06 Thread Dieter Maurer

Bruno Nana writes:
 > select *
 > from iekunde
 > 
 > where (substring(firma,1,1)=substring(,1,1) or
 > substring(firma,1,1) > substring(,1,1)) and
 > (substring(firma,1,1)=substring(,3,1) or
 > substring(firma,1,1) < substring(,3,1))
 > 
 > 
 > And the error is this:
 > 
 > Error Type: Error
 > Error Value: Error processing select * from iekunde where
 > (substring(firma,1,1)=substring(UuZ,1,1) or substring(firma,1,1) >
 > substring(UuZ,1,1)) and (substring(firma,1,1)=substring(UuZ,3,1) or
 > substring(firma,1,1) < substring(UuZ,3,1)) Invalid column name 'UuZ'.
 > Invalid column name 'UuZ'. Invalid column name 'UuZ'. Invalid column name
 > 'UuZ'.
 > 
 > That mean that the operator ">" can only compare two number.

It means that "UuZ" is interpreted as a *column name*, i.e. as
a field in your database and not as a string. This is
because, it is not enclosed in '...'.
Such a column does not exist; therefore, the invalid column name
errors.

Instead of "" you should use
"".
It does represent the constant string value correctly.


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] Calling Stored Procedures using DCOracle

2000-07-06 Thread Dieter Maurer

 > When I execute this :
 > >>> conn.callproc('addarticle',['dfdsf'])
 > 
 > I get the following Error :
 > __getattr__
 > raise error, 'no usable procedure named '+name
 > oci.error: no usable procedure named addarticle
 > 
 > 
 > How ever if I do this :
 > >>> conn.getSource('ADDARTICLE')
 > 
 > It returns the source code.
Notice the (potentially) essential difference:
In "callproc" you use "addarticle" (i.e. all lowercase),
but in "getSource" you use "ADDARTICLE" (i.e. all uppercase).

Maybe, case is essential.

 > In short I need to run my stored procedures from python. They are all ready
 > and waiting to be used. Some one help me :-)
Some days ago, I extended ZOracleDA with a method to call
a stored procedure.

ZOracleDA gives me a cursor. I used:
return cursor.procedures.()


worked fine.



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] getting queries of a database into variables?

2000-07-06 Thread Dieter Maurer

Rajil Saraswat writes:
 >  How do i put up queried data
 > into variables so i can conditionally check them?
The result of an Z SQL method behaves like a list of
row objects. Each row object behaves like an object with
the columns as attributes.

Thus you can use:


   hits="_.len(query)"<-- number of hits-->
   >
   
<-- opens direct access to columns of hit 1 -->
   
   .
 
   


 > Does there exist some readymade package for setting up cookie based
 > authorization. i could locate someting called LoginManager, but how do i
 > use it.
Have a look at the Zope product GUF (Generic User Folder)
--> zope.org; see also the respective HowTows.



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] Reportlab and Zope

2000-07-06 Thread Dieter Maurer

Jorge Magalhaes writes:
 >  How i can insert the contents of the Local File System in to HTML environment?
The easiest way, probably, is Jonothan Farr's LocalFS product.



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 )




[Zope] Re: FSSession buglette

2000-07-06 Thread Paul Gresham

Pavlos Christoforou wrote:
> 
> Paul
> 
> Are you running FSSession0.4.0? If not please upgrade. The problems you
> mention below have been corrected. Nevertheless the first problem you
> descripe is not really related to FSSession. What happens is that certain
> Zope objects that can be pickled should not be stored in FSSession.
> Initially FSSession used marshal to serialize python objects, which is
> faster and does not allow storing of instances etc. I moved to pickle at
> the users request but one should be careful what he/she stores in
> FSSession.
> 
> FSsession-0.4.0 should not raise an exception in tpc_finish. If I
> understand Zope's two phase commit mechanism, it is ok to raise an
> exception in tpc_begin (which corresponds to the 'polling' stage i
> believe) but not in tpc_finish. So now potential problems like full
> filesystem, unpicklable instances etc should be caught in tpc_begin.
> 
> Pavlos
Pavlos Christoforou wrote:
> 
> Paul
> 
> Are you running FSSession0.4.0? If not please upgrade. The problems you
> mention below have been corrected. Nevertheless the first problem you
> descripe is not really related to FSSession. What happens is that certain
> Zope objects that can be pickled should not be stored in FSSession.
> Initially FSSession used marshal to serialize python objects, which is
> faster and does not allow storing of instances etc. I moved to pickle at
> the users request but one should be careful what he/she stores in
> FSSession.
> 
> FSsession-0.4.0 should not raise an exception in tpc_finish. If I
> understand Zope's two phase commit mechanism, it is ok to raise an
> exception in tpc_begin (which corresponds to the 'polling' stage i
> believe) but not in tpc_finish. So now potential problems like full
> filesystem, unpicklable instances etc should be caught in tpc_begin.
> 
> Pavlos

Hi, Yep, I'm definitely running 0-4-0, I think the fact that I did
something naughty caused the rename (and therefore the commit) to fail,
when it expected to work. An exception in the commit then caused Zope to
stop all commits. What is worrying is that someone much more naughty
than I am, may just do something similar on our live system (Once this
goes live)

Regards
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] Fw: [Zope] Re:Web Site newbie

2000-07-06 Thread Loren Stafford


- Original Message -
From: "Loren Stafford" <[EMAIL PROTECTED]>
To: "michael montagne" <[EMAIL PROTECTED]>
Sent: July 06, 2000 01:11 PM
Subject: Re: [Zope] Re:Web Site newbie


> As Andy also said, "It depends".  It depends on what you want to do with
> your website. Write and let us know so we can give more specific answers.
> Chances are you can put all your content in Zope's database.
>
> Some folks decide to store some files outside of Zope and serve them thru
> Apache, for any of the following reasons:
>
> 1. You've got thousands of them
> 2. They're huge (full-length mpeg2 movies, for example -- hundreds of
> megabytes)
> 3. They need to be accessible to other applications
>
> But if you don't have such requirements, count on Zope for everything.
>
> -- Loren
>
> - Original Message -
> From: "michael montagne" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: July 06, 2000 06:49 AM
> Subject: [Zope] Re:Web Site newbie
>
>
> > Tremendous reply!!  Just what I needed.  I'm curious about one thing
tho.
> >  Zope),
> > stick with the built-in ZServer. >
> > Does this mean that I have to have all my files in the zope folder?
> > Wouldn't I want to do that anyway?  Can you elaborate?
> > I'd like to stick with the Zserver if I can but I don't want to run into
> any
> > road blocks too soon down the road.
> > -mjm
> >
>


___
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] Redirect when not authenticated

2000-07-06 Thread Paul Gresham

Hi All,
I have a secure directory (no Anon access) and when I access it, it will
throw me to a login screen in the GUF folder in that dir. What I really
want to happen is for the user to be thrown back up a level to the main
login/news etc etc screen which is a better place to start. however I
seem to be getting all sorts of security problems. Any ideas anyone?

Many thanks
Gresh

___
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] ANN: Forthcoming Zope Book

2000-07-06 Thread Amos Latteier

Hi,

We all know that Zope needs better docs. To this end we've added a help
system, API docs and a tutorial to Zope 2.2.

Now the important work of replacing the aging guides is job number one.

Michel Pelletier has been diligently working on a Zope book for O'Reilly
for a number of months. I convinced him to take me on as a co-author and
turn the book into official Zope documentation. O'Reilly is on board and
is currently choosing between two different open content licenses. Find
out the full scoop on the Zope Docs Wiki.

  http://www.zope.org/Wikis/Docs/ZopeBook

We're excited about the book and think that it will fill an important
hole the current official Zope docs.

As soon as a content license is chosen we'll make our rough drafts
available.

-Amos

--
Amos Latteier mailto:[EMAIL PROTECTED]
Digital Creations http://www.digicool.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] Squishdot giving DateTimeError(newbie)

2000-07-06 Thread Rajil Saraswat

hi
I am trying to setup squishdot. I had correctly setup the system(psotings
etc were going on fine), but a weird thing happened as the 12 in the
night passed by the squish stopped running.
it is now giving Error:DateTimeError
 ErrorValue:UnrecognisedTimeZone
I am running zope on MandrakeLinux7.1, is the time on the system got to
this or is this a squish problem.

Thanks for any clues



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




[Zope] Re: FSSession buglette

2000-07-06 Thread Pavlos Christoforou

Paul

Are you running FSSession0.4.0? If not please upgrade. The problems you
mention below have been corrected. Nevertheless the first problem you
descripe is not really related to FSSession. What happens is that certain
Zope objects that can be pickled should not be stored in FSSession.
Initially FSSession used marshal to serialize python objects, which is
faster and does not allow storing of instances etc. I moved to pickle at
the users request but one should be careful what he/she stores in
FSSession.

FSsession-0.4.0 should not raise an exception in tpc_finish. If I
understand Zope's two phase commit mechanism, it is ok to raise an
exception in tpc_begin (which corresponds to the 'polling' stage i
believe) but not in tpc_finish. So now potential problems like full
filesystem, unpicklable instances etc should be caught in tpc_begin.

Pavlos


___
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] Is Zope slow?

2000-07-06 Thread Steve Alexander


Firestar wrote:
> Check out Jakob Nielsen's website and you would know that speed of serving
> webpages is one of the main usability factors.

The bottleneck is not generally the speed of serving webpages, but
rather, the speed of the client downloading the data from webpages, as
the data has to go through N regions of the Internet between the server
and client.

Also, users tend to look at more than one webpage at a time, and so
their incoming bandwidth per connection is reduced even further.

The answer to this issue is to avoid large graphics and large pages,
allow client-side caching, move the useful content of a site "forwards"
towards its entrance, avoid banner adverts...

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




[Zope] Newbie: Build Object Names

2000-07-06 Thread Terry Babbey

I am trying to build my object names and it is not working. Here is my
code done in three ways and only one way works.
#1 
#2 
#3 
 
 

#1 displays T043AR on the screen
#2 displays the Text I entered into the object (This is what I want)
#3 again only displays the T043AR

Any suggestions? I am hoping I just need some basic information to
accomplish this.

Thanks,
Terry

--
__
Terry Babbey
Technical Support Specialist
Lambton College, Sarnia, Ontario, Canada
__



___
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] FSSession buglette

2000-07-06 Thread Paul Gresham

Hi All,
I had some real problems with FSSession tonight. The first problem was
when the FSSession tried to load, it would get an error along the lines
of failed to import Acquisition. Next step was when the user session
tried to rename and the file wasn't there. This threw in error in a Zope
commit transaction, and rendered the site useless until a restart was
performed (this was correct action by Zope, i.e. all commits are blocked
to avoid the database becoming more screwed after a commit fails).

First thing I did was put a try around the dump to stop it from throwing
an error if the file doesn't exist. This is certainly a preferred option
for us, as it does not affect the function of the FSSession at all
(Except that one session is obviously now duff).

Second thing in tracking down the culprit, I finally figured out that
what I was doing was quite naughty. Basically creating an option for the
user to return to the site and have his/her name already entered into
the login screen. The mistake was putting AUTHENTICATED_USER into
FSSession, it basically tried to store the object, when all I wanted was
the string username! Oops!

Regards
Gresh

___
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] Persisting a dictionary as a object property

2000-07-06 Thread Andy McKay

Thanks that worked like a charm!

- Original Message -
From: "Martijn Pieters" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 05, 2000 5:21 PM
Subject: Re: [Zope] Persisting a dictionary as a object property


> On Wed, Jul 05, 2000 at 04:52:44PM -0700, Andy McKay wrote:
> > Ok so I have an object, I have many properties persisting on the object
> > using the wonderful PropertyManager. But I want to persist a dictionary.
> > This isn't an option for the PropertyManager. I added a dictionary into
the
> > object just by adding the line: _map = {}
>
> You will have to let the persistance machinery know that you changed the
> dictionary. A dictionary is a mutable object, and persistance can only
track
> inmutable objects automatically. See the ZODB docs:
>
>
http://www.zope.org/Documentation/Developer/Models/ZODB/ZODB_Persistent_Obje
cts_Persistent_Doc.html
>
> (http://www.zope.org/Documentation/Developer/Models/ZODB for the framed
set,
> choose Persitent Objects, then Persitent in the bottom-left frame).
>
> You should either treat the dictionary as immutable:
>
>   data = self._map
>   data.append(foo)
>   self._map = data
>
> or set a special flag to let the ZODB know the objetc has changed:
>
>   self._map.append(foo)
>   self._p_changed = 1
>
> You could also replace the dictionary by a PersitentMapping instance. See
> above docs for more info.
>
> --
> Martijn Pieters
> | Software Engineermailto:[EMAIL PROTECTED]
> | Digital Creations  http://www.digicool.com/
> | Creators of Zope   http://www.zope.org/
> | ZopeStudio: http://www.zope.org/Products/ZopeStudio
> -
>
> ___
> 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] Reusing standard_html_header/footer

2000-07-06 Thread Jeff K. Hoffman

On Thu, 6 Jul 2000, Bill Anderson wrote:

> Michael Gutmann wrote:
> > 
> > This is not a question, I think it's more a request for comment.
> > 
> > Problem: I have the following structure of folders. The top folder has
> > the global standard_html_header and acquisition has it, that it
> > is usable in all the subfolders.
> > 
> > /
> >   standard_html_header
> >   SubFolder1/
> >  SubFolder2/
> > 
> > Now I have a small modification in my headers from SubFolder1 downwards.
> > Well, there are many ways to cope with that problem, I want to do it
> > that ways: I want to integrate the old standard_html_header into the
> > new one I define in SubFolder1. Ok, that can look like this:
> >
>
> Not quite sure I understand what you are trying to do but

I believe he is trying to do (in Java, because it's easiest for me to
express it, here):

public class StandardHtmlHeader
{
  public String render() {
return "Hello, World."
  }
}

public class SubStandardHtmlHeader extends StandardHtmlHeader
{
  public void render() {
return super() + " Woohoo!"
  }
}

Well, okay, not exactly, since we're talking acquisition not inheritance.
But, the idea is the same. He wants to display the previous
standard_html_header, with some additional stuff added, in his SubFolder's
standard_html_header.

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.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] the "manage_" methods

2000-07-06 Thread Fabio Akita

Hello

I am trying to realize how the manage_ DTML methods works. The only
documentation that I found was a quick reference that just say that the
methods exist with simple descriptions as:

manage_addDTMLMethod(id, [title, file, REQUEST, submit])

But there is no details about how this works, what´s required. Is there any
documentation about them? I am trying to do a webpage that can change the
content of properties of a folder.

Regards.
[]´s

Fabio Akita - Developer
F/Nazca S&S / Adversiting
[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] Is Zope slow?

2000-07-06 Thread Bill Anderson

Firestar wrote:
> 
> Hi Bill, thanks for your reply.
> 

[...]

> >That's ~6 Million requests/day. Cut it in half, for more
> >complicated tasks, and still moving along at a good clip.
> >What's better, try Apache doing the same things.
> 
> >Does your next project invlove more than just static files
> >sitting on a
> >hard drive? Chances are, you'll be better off with Zope
> 
> I have been programming with PHP and PERL, and they are quite fast,

PHP != Apache
Perl != Apache

These are add-ons.
If you look at the benchmarks you referenced, those were _static_ files
being tested.

 even when serving dynamic pages. Of course, they do not provide all the
features of Zope, but they are able to handle things like sessions,
authentication, database API...which is quite adequate for most
small-to-medium websites. (although sometimes it's quite frustrating
putting the modules together:)
> 
> >Speed and Bencmarks are irrelevant when it comes to real-world
> >performance. :)
> 
> benchmark may not be accurate, but i still think that speed is still impt. Check out 
>Jakob Nielsen's website and you would know that speed of serving webpages is one of 
>the main usability factors.

Believe me, I know all about _performance_ of websites. :)

 
> But then again, if Zope really is THAT good, i may be inclined to switch over and 
>use it as my main development tool in future; but the speed factor is still worrying 
>me - i wouldn't want my website to 'crawl' when i'm presenting it to my boss or 
>clients:)

Have you checked out some real-world sites that run zope? Is being able
to do 6+million requests/day on commodity hardware 'crawling'?


Take it easy
Bill 

-- 
"Linux: the operating system with a CLUE...
Command Line User Environment".

seen in a posting on comp.software.testing

___
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] Which PostGreSQL DA should I use?

2000-07-06 Thread Eric L. Walstad

OK, I am thinking about going from MySQL to PostgreSQL for its transactions
and subqueries.  I am curious which DA I should use and why.  I see that I
can choose from:

1. SQLRelay
2. ZPoPyDA
3. ZPyGreSQLDA

Which are you using and why did you choose it over the others?

Thanks for your time.

Eric.


___
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] Is Zope slow?

2000-07-06 Thread Andy McKay

>  -maybe we could discuss network services/hoster_performance?

This is more of a problem for most people. One evening whilst bored we
calculated that Zope could happily serve enough people to fill up our
pipe... so the bottle neck is our connection.

Mind you we'd had a beer or two so calculations could be flawed.

>
> michael
> drawingincode
>
>
> ___
> 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] Reusing standard_html_header/footer

2000-07-06 Thread Bill Anderson

Michael Gutmann wrote:
> 
> This is not a question, I think it's more a request for comment.
> 
> Problem: I have the following structure of folders. The top folder has
> the global standard_html_header and acquisition has it, that it
> is usable in all the subfolders.
> 
> /
>   standard_html_header
>   SubFolder1/
>  SubFolder2/
> 
> Now I have a small modification in my headers from SubFolder1 downwards.
> Well, there are many ways to cope with that problem, I want to do it
> that ways: I want to integrate the old standard_html_header into the
> new one I define in SubFolder1. Ok, that can look like this:
>
Not quite sure I understand what you are trying to do but

in your root standard_html_header:

  


And then put the additions in local_header.

Might get you what you want.

-- 
"Linux: the operating system with a CLUE...
Command Line User Environment".

seen in a posting on comp.software.testing

___
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 or DTML

2000-07-06 Thread Andy McKay

> The Zope core is *written* in python (with hotspots coded in python
> modules written in C), not just integrated with it.  Since DTML
> must be interpreted by the Zope core (an interpreter running in an
> interpreter), whereas the python code in an external method is
> simply (more or less) executed (just one interpretation level), I
> would expect external methods and python products to be a lot faster
> than the same functionality coded in DTML.  But I'm speculating
> here based only on my current mental model of how Zope works, so
> I could be wrong .

I agree, again Im no expert, but from what I understand DTML is parsed into
Python and then executed. You can skip that step altogether by not using
DTML. I also find DTML is rather painful and anything involving 5 or 6 lines
of DTML can be coded in *less* lines of more efficient Python!


___
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] Newbe question concerning using python classes and external methods

2000-07-06 Thread Richard Taylor

"Gaspard, Bradley S" <[EMAIL PROTECTED]> writes:

> All,
> 
> I am a new Zope user and I guess I'm missing something fundemental that I
> haven't been able to glean from the documentation and various "How-to's".
> As a learning tool I am trying to implement one of Brian Lloyd's examples I
> found on the Web implementing a GuestBook.  
> 
> I suspect what I don't understand is how to write the external method that
> would make use of this class (The one I have been playing with follows the
> class definitions).  Anyhow, I've created an an external method and call
> (e.g. ) after which the guestBookForm is displayed.  After
> filling out the form and submitting it Zope does not seem able to find the
> signGuestBook method.  What am I doing wrong??
>

I not to sure why you have gone down the route of doing all of this as
an external method? I would have thought that the form should be
generated from an DTMLDocument and a signal function in the External
method could do the file-stuff and return the success page, no real
need for the class at all. But, I guess you are just using this as a
learning exercise, so what do I know.


Zope can't find you signGuestBook function because it knows nothing
about your  GuestBook class. The only thing you have told it about is
the ExternalMethod AddGuest. You could add another ExternalMethod
something like (code not tested):

 def SignGuestBook(name,email):
   myGuestBook=guestbook.GuestBook('My GuestBook', 'guestbookdata.txt')
   return myGuestBook.signGuestBook(name,email)

then create a DTMLmethod call signGuestBook:



you will need to add the SignGuestBook function as an external method
in addition to the one you already have.

You can see from this that the creation of an instance of the
GuestBook class is pretty pointless because it only exists within the
scope of the function in which it is created.

Another thing to bear in mind (it caught me out recently) is that
ExternalMethods are load once when Zope is started (or they are first
called, I am not sure which) not every time they are called. This
means that any global variables you create are common to every
call. As Zope is multithreaded this may catch you out if you do not
consider it.

Hope this helps.

Richard

> Other than mostly trivial examples, I haven't been able to find many
> complete (working) examples of using external methods.
> 
> Thanks in advance for any help.
> 
> """Module guestbook: a simple guestbook application"""
> 
> class GuestBook:
>   """A guestbook object that provides both the forms
>  and the handling of submitted form data."""
> 
>   def __init__(self, title, filename):
> self.title=title
> self.filename=filename
> 
>   def guestbookForm(self):
> """Return the guestbook from to the user"""
> return """
> %s
> 
> %s
> Please sign our guestbook!
> 
> 
> Name: 
> Email: 
> 
> 
> 
> """ % (self.title, self.title)
> 
>   def successPage(self):
> """Return a page to thank the user on success"""
> return """
> %s
> 
> Thank You!
> Thank you for signing %s!
> 
> """ % (self.title, self.title)
> 
>   def signGuestBook(self, name, email='not specified'):
> """Handle a submitted guestbook form"""
> 
> # Open a file to save the guestbook entry
> try: 
>   file=open(self.filename, 'a')
> except IOError:
>   file=open(self.filename, 'w')
> entry='Guestbook entry: %s %s\n' % (name, email)
> file.write(entry)
> file.close()
> return self.successPage()
> 
> External method
> 
> import sys
> sys.path.append('/usr/local/src/Zope-2.1.6-linux2-x86/lib/python/Shard/jscap
> e/winsat')
> 
> import guestbook
> 
> def AddGuest(self):
>   myGuestBook=guestbook.GuestBook('My GuestBook', 'guestbookdata.txt')
>   return myGuestBook.guestbookForm()
> 
> Brad
> 
> ___
> 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] Re:Web Site newbie

2000-07-06 Thread Andy McKay

A site might be more than just Zope, it could be a whole of bunch of servers
applications etc. For example an e-commerce section written in say Perl, or
streaming audio from some other server or some fancy.

Most stuff 90% of sites do can be done in Zope and ZServer is great for
that. To serve from ZServer I think files have to be in Zope (but I might be
wrong on that)...

As ever it depends...

- Original Message -
From: "michael montagne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 6:49 AM
Subject: [Zope] Re:Web Site newbie


> Tremendous reply!!  Just what I needed.  I'm curious about one thing tho.
>  stick with the built-in ZServer. >
> Does this mean that I have to have all my files in the zope folder?
> Wouldn't I want to do that anyway?  Can you elaborate?
> I'd like to stick with the Zserver if I can but I don't want to run into
any
> road blocks too soon down the road.
> -mjm
>


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

2000-07-06 Thread Andy McKay

Wild stab in the dark is that there is a problem writing a the standard
stupid_log_file if you get rid of -D to stop logging. But IMHO logging is
useful and there is a problem writing to the file for some reason, its worth
fixing.

- Original Message -
From: "Mario Premke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 7:44 AM
Subject: [Zope] howto_GUF


> Hi,
> I have installed Genreic User Interface with
> all the permission settings described in the
> README, but I cannot log into the folder
> which I want to protect. When I log in as
> "jorge" with passwd "secret" I get:
>
> Sorry, a Zope error occurred.
>
>  Traceback (innermost last):
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 214, in publish_module
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 179, in publish
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/__init__.py, line 202,
> in zpublisher_exception_hook
>  (Object: ElementWithAttributes)
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 151, in publish
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/BaseRequest.py,
> line 430, in traverse
>File
>
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Products/GenericUserFolder/Gener
icUserFolder.py,
> line 270, in validate
>  (Object: ElementWithAttributes)
>File
>
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Products/GenericUserFolder/Gener
icUserFolder.py,
> line 308, in _basic_validate
>  (Object: ElementWithAttributes)
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/zLOG.py, line 198, in LOG
>File
> /home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/ZLogger.py,
> line 18, in log_write
>File
>
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/stupidFileLogger.py
,
> line 40, in __call__
>File
>
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/stupidFileLogger.py
,
> line 62, in stupid_log_write
>  IOError: [Errno 5] Input/output error
>
>
>
>
> Any hints will be appreciated ...
> Mario
>
> ___
> 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] Proxy Roles

2000-07-06 Thread Robert Wohlfahrt

Hi,

i have a Problem using Proxy-Roles:

i have following folders:

/foo/
bar1/
comments/
TEMPLATE
bar1/
comments/
TEMPLATE
barN/
...

/make_a_comment/
submit

>From a DTML-Method in "make_a_comment" I want to copy the folder
TEMPLATE in a spezified comments-Folder and change some properties.
I wrote a dtml-method called "submit":








Now I want to use a Proxy-Role for "submit" to make it possible for
everyone to add a comment with this method.
I added the proxy-role "manager" to the "submit"-method. But if I
access submit as anonymous, Zope still means, I don't have
permissions to add a folder to /foo/barx/comments/...  
Any ideas to solve this problem? I use Zope-2.1.4 on a RedHat Linux

Thanks

Robert
-- 
Robert Wohlfahrt ([EMAIL PROTECTED])
Tel: 0179 / 2980074 Fax: 0351 / 2880145

___
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 or DTML

2000-07-06 Thread R. David Murray

On Thu, 6 Jul 2000, Peter Bengtsson wrote:
> I know that Python is integrated _very_ closly to the Zope core, but to use
> a Python module you'll have to create an External Method and a file in the
> Extensions folder;
> and this might be slower than using DTML. Right?
> 
> Basically, how much faster is DTML to Python (assuming the codes outputs the
> same thing)?

The Zope core is *written* in python (with hotspots coded in python
modules written in C), not just integrated with it.  Since DTML
must be interpreted by the Zope core (an interpreter running in an
interpreter), whereas the python code in an external method is
simply (more or less) executed (just one interpretation level), I
would expect external methods and python products to be a lot faster
than the same functionality coded in DTML.  But I'm speculating
here based only on my current mental model of how Zope works, so
I could be wrong .

--RDM


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




Re: [Zope] zope/python startup error

2000-07-06 Thread Peter Bengtsson

I had that same error before as well.
That had nothing to do with Zope, rather Python itself. The problem was that
I had not installed TCL properly, and I reinstalled it.

But, true, your drivers must have been confused when you installed this
"shed-load" of Zope products.
Try to reinstall Python (the one with IDLE) and let the installtion use the
suggested paths for Python and TCL.

I had some "problems" with the PythonWin. After having opened a fully
functioning Python code in PythonWin, I could no longer use the following
code.
import sys
sys.path.insert(0,'C:\Program\Zopesite\Extensions')

... so I commented this out and it worked perfectly fine as before in Zope.
Strange.

Cheers, Peter


- Original Message -
From: tom smith <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 5:01 PM
Subject: [Zope] zope/python startup error


> newbie question.
>
> when zope starts I get the attached error dialog. Any ideas how I can fix
> this since zope is running on a remote server? It seemed to start going
> wrong after installing a shed-load of products into zope.
>
> cheers
>
> tom
>
> ps. to go into greater detail...
>
> ...I have two copies of Python...one in Zope's "lib" folder, and another
in
> "Program files". Do I "need" both? Are they getting their PYTHONPATHs
mixed
> up?
>
> Ideally I'd like just one Python, but with the IDLE editor AND the Windows
> extensions (ODBC),is this possible and how would I do it. Can I add IDLE
and
> ODBC to zope's python without breaking zope.
>
>
>
>


___
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] SquishDot properties

2000-07-06 Thread Chris Withers

tom smith wrote:
> I'd like to add a URL property to a Squishdot article (and remove the "dept"
> property), is this possible and how would I do it?

The 'proper' response would be 'no'.

The hacky response is, just store the URL in the 'dept' property ;-)
Adjust your forms slightly (so they say URL instead of dept but make
sure the form field is still named 'dept').

Nice huh? ;-)

(I was going to do something similar(ly nasty ;-) to use the file
attachment feature to store an image that was rendered when you viewed
the posting ;-)

> Also, can I auto-complete the "from" field with the users' username that
> they have logged in withthis is for an intranet

What have they logged in with? Squishdot should 'remember' the name and
email address after they're typed it in once, which maybe helpful since
I get a feeling what you're asking about may not be possible :(

cheers,

Chris

PS: Squishdot has it's own mailing list as well: [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] ZWiki with RemoteWikiLink - minor fix and remaining question

2000-07-06 Thread Geoff Gardiner

I needed to create 'proper' URLs with a remote wiki link, but ZWiki 0.6.1
only allowed things of the form ZWikiName:name-with-characters-only. I
suppose my locale setting translates too many things to whitespace, but I'm
not sure.

A simple fix in the ZWikiPage.py file (sorry no diff here):
 find line
interwikilink= r'!?((?P%s):(?P[\w]+))' % (wikilink)
 replace string
[\w] by [A-Za-z0-9/:@_~#=\.\-\?]

(note I couldn't include the % char because it seems to provoke the need for
another string).

Remaining question. Does anyone have a fix for the incorrect rendering of
[notzwikiname] to nested URL
  notzwikiname
or do I have to fix that for myself? This also fails to work as a remote
wiki link, and I thought a fix for one might be a fix for the other also.

Thanks.

Geoff Gardiner


___
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] Newbe question concerning using python classes and external methods

2000-07-06 Thread Gaspard, Bradley S

All,

I am a new Zope user and I guess I'm missing something fundemental that I
haven't been able to glean from the documentation and various "How-to's".
As a learning tool I am trying to implement one of Brian Lloyd's examples I
found on the Web implementing a GuestBook.  

I suspect what I don't understand is how to write the external method that
would make use of this class (The one I have been playing with follows the
class definitions).  Anyhow, I've created an an external method and call
(e.g. ) after which the guestBookForm is displayed.  After
filling out the form and submitting it Zope does not seem able to find the
signGuestBook method.  What am I doing wrong??

Other than mostly trivial examples, I haven't been able to find many
complete (working) examples of using external methods.

Thanks in advance for any help.


"""Module guestbook: a simple guestbook application"""

class GuestBook:
  """A guestbook object that provides both the forms
 and the handling of submitted form data."""

  def __init__(self, title, filename):
self.title=title
self.filename=filename

  def guestbookForm(self):
"""Return the guestbook from to the user"""
return """
  %s
  
  %s
  Please sign our guestbook!
  
  
  Name: 
  Email: 
  
  
  
  """ % (self.title, self.title)

  def successPage(self):
"""Return a page to thank the user on success"""
return """
  %s
  
  Thank You!
  Thank you for signing %s!
  
  """ % (self.title, self.title)

  def signGuestBook(self, name, email='not specified'):
"""Handle a submitted guestbook form"""

# Open a file to save the guestbook entry
try: 
  file=open(self.filename, 'a')
except IOError:
  file=open(self.filename, 'w')
entry='Guestbook entry: %s %s\n' % (name, email)
file.write(entry)
file.close()
return self.successPage()





External method

import sys
sys.path.append('/usr/local/src/Zope-2.1.6-linux2-x86/lib/python/Shard/jscap
e/winsat')

import guestbook

def AddGuest(self):
  myGuestBook=guestbook.GuestBook('My GuestBook', 'guestbookdata.txt')
  return myGuestBook.guestbookForm()




Brad


___
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] Newbie: Date checking?

2000-07-06 Thread Marcel Preda

>  _.DateTime(expirydate).isFuture()">
> > ...
> > ...
> > 
>
> This gives:
> Error Type: TypeError
> Error Value: __div__ nor __rdiv__ defined for these operands

Is better to put some mor lines from Traceback Exception
To see the modul and the line
>
> The dates are pulled from an access (!) database where they are defined
> as date/time types.
>
>Me confoosed.
>
> Andy G

Me too.


Someting like

STORY


or


STORY


works on Zope 2.1.4  and Zope 2.1.6

I was thinking that are strings, I have made this  many, many times.



btw: what type are IN ZOPE?

If are date/type in Zope , I guess that you can use something like


Maybe you are lucky, I didn't test it :)




PM




___
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] zope/python startup error

2000-07-06 Thread tom smith

newbie question.

when zope starts I get the attached error dialog. Any ideas how I can fix
this since zope is running on a remote server? It seemed to start going
wrong after installing a shed-load of products into zope.

cheers

tom

ps. to go into greater detail...

...I have two copies of Python...one in Zope's "lib" folder, and another in
"Program files". Do I "need" both? Are they getting their PYTHONPATHs mixed
up?

Ideally I'd like just one Python, but with the IDLE editor AND the Windows
extensions (ODBC),is this possible and how would I do it. Can I add IDLE and
ODBC to zope's python without breaking zope.




 zope_error.gif


[Zope] MacOSX

2000-07-06 Thread tom smith

I noticed in the how-tos that someone had managed to make a build of zope
for
MacOSX . Given that I know nothing about unix commands, is there a pre-made
binary I can just drop onto my G4 (running OSX DP4) and run? Is this even
possible or is it
not the unix way?

IS there a reason for there not being a macintosh version of zope, does the
platform not allow it or is it just that nobody has wanted to do it

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 )




[Zope] SquishDot properties

2000-07-06 Thread tom smith

hi,

I'd like to add a URL property to a Squishdot article (and remove the "dept"
property), is this possible and how would I do it?

Also, can I auto-complete the "from" field with the users' username that
they have logged in withthis is for an intranet

cheers

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] Z SQL Method

2000-07-06 Thread Richard Moon

On Wed, 5 Jul 2000, Paul Aviles wrote:
 >
 > What am I doing wrong?? Also, is there a way to connect to a postgres or
 > mysql database? Is one better than the other?

Postgresql is a true object relational database which includes the ability 
to define transactions etc., MySQL isn't a true RDBMS. If you are serious 
about the back-end and your application includes the ability to update the 
database by more than one user concurrently then PostgreSQL is the way to 
go. It's also Open Source.

It's easy to connect to Postgresql using the ZPyGreSQLDA which you can find 
on zope.org at the end of the downloads pages.



___
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 or DTML

2000-07-06 Thread Peter Bengtsson

I know that Python is integrated _very_ closly to the Zope core, but to use
a Python module you'll have to create an External Method and a file in the
Extensions folder;
and this might be slower than using DTML. Right?

Basically, how much faster is DTML to Python (assuming the codes outputs the
same thing)?
The reason I ask is that I (probably as everybody else) want an as fast site
as possible, but still use the power of Python.

And also, whats the performance difference of using External python modules
compared to the Python Method product?


Peter Bengtsson - bloody good programmer

Under UK Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of £500 damages/incident, £1500 for
repeats.


___
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] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Andy Gates

> 
> ...
> ...
> 

This gives:
Error Type: TypeError
Error Value: __div__ nor __rdiv__ defined for these operands

The dates are pulled from an access (!) database where they are defined
as date/time types.  Me confoosed.

Andy

___
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] Is Zope slow?

2000-07-06 Thread J. Atwood

No. Not when compared to other applications that do the same *type* of thing
(which there are very very few).

Check out an interesting set of benchmarks I ran against Zope and Tomcat
connecting to a PostgreSQL database.

http://www.zope.org/Members/BwanaZulia/benchmarks.html

J



> From: Firestar <[EMAIL PROTECTED]>
> Date: Wed, 5 Jul 2000 22:13:32 -0400 (EDT)
> To: [EMAIL PROTECTED]
> Subject: [Zope] Is Zope slow?
> 
> Hi,
> 
> I'm considering using Zope as the development tool for my next web project.
> However, I read from a recent benchmark test (from Qube, i think) that
> Zope(running thru Zserver?) is much SLOWER than Apache and AOLserver.  Is that
> true? To all Zope users and 'guru's, what is yr experience using Zope?
> 


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

2000-07-06 Thread Mario Premke

Hi,
I have installed Genreic User Interface with
all the permission settings described in the
README, but I cannot log into the folder
which I want to protect. When I log in as
"jorge" with passwd "secret" I get:

Sorry, a Zope error occurred.

 Traceback (innermost last):
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
214, in publish_module
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
179, in publish
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/__init__.py, line 202,
in zpublisher_exception_hook
 (Object: ElementWithAttributes)
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line
151, in publish
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/BaseRequest.py,
line 430, in traverse
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Products/GenericUserFolder/GenericUserFolder.py,
line 270, in validate
 (Object: ElementWithAttributes)
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Products/GenericUserFolder/GenericUserFolder.py,
line 308, in _basic_validate
 (Object: ElementWithAttributes)
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/zLOG.py, line 198, in LOG
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/ZLogger.py,
line 18, in log_write
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/stupidFileLogger.py,
line 40, in __call__
   File
/home/mapr/Zope-2.1.6-linux2-x86/lib/python/Zope/ZLogger/stupidFileLogger.py,
line 62, in stupid_log_write
 IOError: [Errno 5] Input/output error




Any hints will be appreciated ...
Mario

___
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] LONG insert > 2000 chars fail

2000-07-06 Thread Chris McDonough

Use ?

> -Original Message-
> From: Andy Gates [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 06, 2000 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Zope] LONG insert > 2000 chars fail
> 
> 
> Message-ID: <[EMAIL PROTECTED]>
> Priority: NORMAL
> X-Mailer: Execmail for Win32 5.1 Build (9) 
> MIME-Version: 1.0
> Content-Type: Text/Plain; charset="us-ascii"
> 
> Possibly related:  Webform-based news story editor generates 
> long text 
> strings for body text.  Using an ordinary form, this ends up 
> (url-encoded) in the URL, but it's betting truncated after about 2000 
> chars.  Many of my stories are longer than that.  What to do?
> 
>   AndyG
> 
> ___
> 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] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Andy Gates

Message-ID: <[EMAIL PROTECTED]>
Priority: NORMAL
X-Mailer: Execmail for Win32 5.1 Build (9) 
MIME-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"

> 
> ...
> 

I'll work it out one day, honest.  Ta.

AndyG

___
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] LONG insert > 2000 chars fail

2000-07-06 Thread Andy Gates

Message-ID: <[EMAIL PROTECTED]>
Priority: NORMAL
X-Mailer: Execmail for Win32 5.1 Build (9) 
MIME-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"

Possibly related:  Webform-based news story editor generates long text 
strings for body text.  Using an ordinary form, this ends up 
(url-encoded) in the URL, but it's betting truncated after about 2000 
chars.  Many of my stories are longer than that.  What to do?

AndyG

___
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] R: [Zope] Newbie: Date checking?

2000-07-06 Thread Marcel Preda

- Original Message -
From: Andy Gates <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 4:06 PM
Subject: [Zope] Newbie: Date checking?




> A quicky for you Zopistas:  I have some dates in a database, which
> govern when a story becomes live and when it expires.  I need to do a
> test along the lines of:
>
> dtml-in stories
>   if (startdate is past) and (expirydate is future)
> show the story
>   /if
> /in
>
> I have seen the fmt parameters isPast and isFuture and this gives me a
> true/false response:but how do I use
> that in an if test?
>> I keep (as usual) getting syntax errors.
:)



...
...



PM


___
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] Newbie: Date checking?

2000-07-06 Thread Andy Gates

A quicky for you Zopistas:  I have some dates in a database, which 
govern when a story becomes live and when it expires.  I need to do a 
test along the lines of:

dtml-in stories
  if (startdate is past) and (expirydate is future)
show the story
  /if
/in

I have seen the fmt parameters isPast and isFuture and this gives me a 
true/false response:but how do I use
that in an if test?  I keep (as usual) getting syntax errors.  Help!

--
Andy Gates, Learning and Research Technology
[EMAIL PROTECTED] - ICQ#74362415


___
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] LONG insert > 2000 chars fail

2000-07-06 Thread Riku Voipio

On Thu, Jul 06, 2000 at 08:48:43AM -0400, Satheesh Babu wrote:
> Hi,
> 
> We use Oracle v 8.1.5 and 8.1.6 and there we can go upto
> 5000 characters for string literals. Anyway, LONG is a
> deprecated datatype and we decided to use detail tables
> for text more than 4000 chars. Any given string will be
> split at 4000 chars and inserted as one or more records
> into detail table, as varchar2 fields. Varchar2 fields
> are easy to process also.

Yes, you are right, we are using 8.1.5 On Linux, and it swallows 
up to 4k. But having to split a string to get it in the database 
feels pretty stupid. 

> I think it is more of an Oracle OCI problem than OracleDA.

Yep, I tried to look at oci.c/oci.i sources and got shocked... 
Maybe overnight I'll gather some courage to see if it would 
be feasible to use 'bind variables' to push data in to the long 
columns. Or will it be easier to split text with a python 
external method.

-- 
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


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




[Zope] Re:Web Site newbie

2000-07-06 Thread michael montagne

Tremendous reply!!  Just what I needed.  I'm curious about one thing tho.

Does this mean that I have to have all my files in the zope folder?
Wouldn't I want to do that anyway?  Can you elaborate?
I'd like to stick with the Zserver if I can but I don't want to run into any
road blocks too soon down the road.
-mjm

 winmail.dat


Re: [Zope] CorruptTransactionError (Bad news for production site!)

2000-07-06 Thread Richard Taylor


Jim

Thank you for your prompt response. This is what I love about using
Open Source Software, the responses come from peole who really know
what they are talking about.

Further responses in-line.



Jim Fulton <[EMAIL PROTECTED]> writes:

> Richard Taylor wrote:
> > 
> > Today I had to role back two days of transactions from my production
> > site because when I packed the database I was informed of a
> > CorruptTransactionError.
> 
> Did anything else happen previous to this? Did you run out of space
> or anything like that?
>

We had been doing some extensive development work and the ZDB had
reached about 2Gbytes, but the disk was not full. I packed the
database (down to 10M approx.) without any trouble. We then carried
on using the system for another two days and I then packed the
database again. This time I got the CorruptTransactionError. I
followed the instruction to truncate the database and successfully
recovered it. Close examination of the bobo_modification_times on the
objects left in the database showed that the error occurred at about
the time of the first pack.
 
> You should have been able to use Data.fs.old, which is a copy
> of the database before the pack to restore the data. Or was the
> error in there too?  I'd be interested in looking at the Data.fs
> file before the pack to try to figure out what might have gone wrong.
> 
Unfortunately the error occurred after (or during the first pack) the
second pack over-rote the Data.fs.old with the corrupt database. The
real problem was that the corrupt transaction did not have an
immediate affect.

> (If you send my your Data.fs file, please remember to send it
> to me privately and to zip or compress it. :)
>
I would love to send you the Data.fs file but unfortunately it
contents sensitive commercial information for my company and I would
be sacked for sending it out. 

I know how difficult it is to track down bugs when people will not
give you repeatable examples, but I just can't send this stuff out.

> > We are using Zope for an internal knowledge management application
> > where anyone in the organization can add objects. So I have no way of
> > know what was added after the fateful transaction and no way of
> > getting any of it back.
> > 
> > Bummer!
> 
> Indeed.
> 
> > I think this raises a few questions about ZDB:
> > 
> > 1) We need some tools for selectively removing bad transactions
> >rather than just truncating Data.fs back to the last good one and
> >loosing everything that comes after it.
> 
> Zope 2.2 has just such a tool. In the ZODB directory, there is a 
> Python script, fsrecover.py which simply calls the recover function
> in the FileStorage module. This will work with any 2.x databases.
> It scans from both the beginning and the end of the file until 
> it finds a corrupted section and then removes the corrupted portion
> from the file.  You utility modifies the file in-place, so you need
> to shut-down the site, or work on a copy when you use it.
>

Fantastic! this is exactly what I was banging on about. No if only I
had not deleted the original corrupt Data.fs file out of discussed I
would be able to get back my stuff (I think I need a serious talking
to.)
 
> > 2) We could do with a tools that can verify the ZODB offline. This
> >could then be run at regular intervals (maybe once an hour from
> >cron) so that corruptions can be picked up earlier.
> 
> You could use a little Python script that did something like:
> 
>   import ZODB.FileStorage
>   file_name='../../var/Data.fs'
>   file=open(file_name, 'r+b')
>   index={}
>   vindex={}
>   tindex=[]
>   ZODB.FileStorage.read_index(
> file, file_name, index, vindex, tindex)
> 
> This basically reads the FileStorage index as would normally
> be done during startup.
>

I shall be installing (and testing) this tonight!

> > 3) Some way to find out what was added after a corrupt transaction is
> >needed so that at least I could see who I need to ask to re-add
> >their stuff.
> 
> The fsrecover script should avoid the need for this.
>

Agreed.
 
> Jim
> 

Richard

___
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] Calling Stored Procedures using DCOracle

2000-07-06 Thread Monty Taylor

Here's what happenes from me. You can see from the getSource on 
PGM140_API that the procedure exists within called select_targets. I 
can't get anything to recognize it.

Help?

>>> dbc.getSource('PGM140_API.SELECT_TARGETS')
''
>>> dbc.getSource('PGM140_API')
'PACKAGE PGM140_API IS\012-- PL/SQL Specification\012type asms_record is 
record\012  (amsm_id assoc_masters.asms_id%type\012  ,name
assoc_masters.name%type\012  );\012\012  type asms_cursor is ref 
cursor return asms_record;\012\012  procedure select_targets\012  
(pp_namein varchar2\012  ,pp_result  in out asms_cursor);\012\012/* 
select targets  by name\012   pp_name defines the search argument - it 
makes no difference if this is uppercase or lowecase\012   pp_result 
returns result\012*/\012\012  type technology_record is record\012  
(et_id   emerging_technologies.et_id%type\012  ,name
emerging_technologies.name%type\012  );\012\012  type technology_cursor 
is ref cursor return technology_record;\012\012  procedure 
select_technologies\012  (pp_categoryin varchar2\012  ,pp_result  in 
out technology_cursor);\012\012\012END PGM140_API;\012'
>>> dbc.getSource('SELECT_TARGETS')
''
>>> dbc.getSource('PGM140_API.select_targets')
''

>> Original Message <<

On 7/6/00, 2:32:39 PM, Satheesh Babu <[EMAIL PROTECTED]> wrote regarding RE: 
[Zope] Calling Stored Procedures using DCOracle:


> Did you try
> >>> conn.callproc('ADDARTICLE',['dfdsf'])
> ?

> As far as I know Oracle stores the object names
> in upper case in the data dictionary.

>~  V.Satheesh Babu [EMAIL PROTECTED]
>   . . http://vsbabu.csoft.net/
>   /V\ - Duct tape is like the force.  It has
>  // \\  a light side, and a dark side, and
> /(   )\ it holds the universe together ...
>  ^'~'^

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Ronnie Sengupta
> Sent: Thursday, July 06, 2000 3:47 AM
> To: [EMAIL PROTECTED]
> Subject: [Zope] Calling Stored Procedures using DCOracle


> Hi,

> I am using DCOracle Ver 1.3.1 1b1. Connected to Oracle Ver 8.1.6.

> When I execute this :
> >>> conn.callproc('addarticle',['dfdsf'])

> I get the following Error :
> __getattr__
> raise error, 'no usable procedure named '+name
> oci.error: no usable procedure named addarticle


> How ever if I do this :
> >>> conn.getSource('ADDARTICLE')

> It returns the source code.

> In short I need to run my stored procedures from python. They are all 
ready
> and waiting to be used. Some one help me :-)


> Regards,
> Ronnie
> [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 )

___
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] Error tracing...

2000-07-06 Thread Peter Bengtsson

The tracing error should be comment in the error message page.
View Source.

Make sure you start up zope with -D for debugging reason.
- Original Message - 
From: Peter Arvidsson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 06, 2000 6:55 PM
Subject: [Zope] Error tracing...


> How do I trace errors in Zope? I get the following error message:
> "Empty entry when integer expected "
> It gives a hint of the problem but I cant see what value is empty.. how
> do I control the values? Is there some way to write out variables or do
> I just have to guess???
> 
> 
> ___
> 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] wierdness with 2.2, Security, and manage_addProduct[' ']..

2000-07-06 Thread Brian Lloyd

> Why won't this work in Zope 2.2? Make a DTML method containing:
> 
> 
>   
> 
> 
> I cannot find a way to make the security system let this 
> through. 
>
> 
> 
> I've pretty much convinced myself it's a bug in the 2.2 
> security system...
> 
> Anyone? Brian?

It is (or rather was). The fix is in beta 4, out late today/
early tomorrow.

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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] Calling Stored Procedures using DCOracle

2000-07-06 Thread Satheesh Babu

Did you try 
>>> conn.callproc('ADDARTICLE',['dfdsf'])
?

As far as I know Oracle stores the object names
in upper case in the data dictionary.

   ~  V.Satheesh Babu [EMAIL PROTECTED]
  . . http://vsbabu.csoft.net/
  /V\ - Duct tape is like the force.  It has
 // \\  a light side, and a dark side, and
/(   )\ it holds the universe together ...
 ^'~'^

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Ronnie Sengupta
Sent: Thursday, July 06, 2000 3:47 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Calling Stored Procedures using DCOracle


Hi,

I am using DCOracle Ver 1.3.1 1b1. Connected to Oracle Ver 8.1.6.

When I execute this :
>>> conn.callproc('addarticle',['dfdsf'])

I get the following Error :
__getattr__
raise error, 'no usable procedure named '+name
oci.error: no usable procedure named addarticle


How ever if I do this :
>>> conn.getSource('ADDARTICLE')

It returns the source code.

In short I need to run my stored procedures from python. They are all ready
and waiting to be used. Some one help me :-)


Regards,
Ronnie
[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] Error tracing...

2000-07-06 Thread Michael Gutmann

>How do I trace errors in Zope? I get the following error message:
>"Empty entry when integer expected "
>It gives a hint of the problem but I cant see what value is empty.. how
>do I control the values? Is there some way to write out variables or do
>I just have to guess???
>

Hi Peter,
if the value comes from a form, that means you can find it in the
REQUEST variable, then you'll find a snippet of code in the FAQ

http://zdp.zope.org/projects/zfaq/faq/DTML#951172007

to show the given values.

Michael

Michael Gutmann M.A.
Universitaetsrechenzentrum  
Heinrich-Heine-Universitaet Duesseldorf 

___
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] LONG insert > 2000 chars fail

2000-07-06 Thread Riku Voipio

Hi, 

Looks like DCOracle/Zoracle still doesn't support LONG objects properly.
According to Oracle's overly verbose "SERVER MESSAGES" manual the 
following means that oracle will accept only upto 2000 chars as 
quoted string, anything more should be uploaded via binded variables...

Error Type: oci.error
Error Value: (1704, 'ORA-01704: string literal too long')


 Traceback (innermost last):
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /usr/lib/zope/lib/python/Zope/__init__.py, line 202, in 
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 165, in publish
  File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: insert_reporter)
  File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object
(Object: insert_reporter)
  File /usr/lib/zope/lib/python/OFS/DTMLDocument.py, line 166, in __call__
(Object: insert_reporter)
  File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 504, in __call__
(Object: insert_reporter)
  File /usr/lib/zope/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval
(Object: insert_report(app=app,tmodule=tmodule,ver=ver,header=header,text=text, 
tyyppi=TYYPPI))
(Info: header)
  File , line 0, in ?
  File /usr/lib/zope/lib/python/Shared/DC/ZRDB/DA.py, line 430, in __call__
(Object: insert_report)
  File /usr/lib/zope/lib/python/Products/ZOracleDA/db.py, line 189, in query
  File /usr/lib/zope/lib/python/Products/ZOracleDA/DCOracle/ociCurs.py, line 298, in 
execute
  File /usr/lib/zope/lib/python/Products/ZOracleDA/DCOracle/ociCurs.py, line 221, in 
_parse
  File /usr/lib/zope/lib/python/Products/ZOracleDA/DCOracle/ociCurs.py, line 109, in 
_error
oci.error: (see above)

--
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


___
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] Is Zope slow?

2000-07-06 Thread michael bolger

maybe if we all share "optimum" hardware configuration to improve
performance+
-where is your server "hosted" as this is vital(obviously:)) to
speed/performance
 -maybe we could discuss network services/hoster_performance?

michael
drawingincode


___
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] Reusing standard_html_header/footer

2000-07-06 Thread Michael Gutmann

>On Thu, 6 Jul 2000, Michael Gutmann wrote:
>
>> :-(  Second try: 
>>  Well, this gives me the right object, but it isn't rendered. As
>>  I reviewed the list archive, I found out, that this seems to be
>>  normal. Maybe somebody can explain why, if he/she has 
>>  some sparetime.
>
>I haven't tried this and I am FAR from being a Zope expert. But, did you
>try dtml-call? Shouldn't that work?

Hm, as I understood - and watching the results after a try - a dtml-call 
has no output.

Michael

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

2000-07-06 Thread Chris Withers

Bruno Nana wrote:
> So can i do:
> substring(firma,1,1) > substring(UuZ,1,1)
> or
> substring(firma,1,1) < substring(UuZ,1,1))
> when the two member are comparable(number)

Try:

> _.int(substring(firma,1,1)) > _.int(substring(UuZ,1,1))
> or
> _.int(substring(firma,1,1)) < _.int(substring(UuZ,1,1)))

...for the second time today ;-)

Chris

PS: You should be using  rather than  by now!

___
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] Error tracing...

2000-07-06 Thread Peter Arvidsson

How do I trace errors in Zope? I get the following error message:
"Empty entry when integer expected "
It gives a hint of the problem but I cant see what value is empty.. how
do I control the values? Is there some way to write out variables or do
I just have to guess???


___
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] keyword index and netscape vs ie

2000-07-06 Thread Marcel Preda

> 
>  sequence-item>
> 
> 
> This works fantastic if you are using IE or a keyword is just one word.
> Netscape does not seem to do anything intelligent if it is a key phrase
> instead and returns an error. Below are examples of the resolved urls it
> is trying to load
> 
> IE .../search?key=direct%20access
> Netscape   .../search?key=direct access
> 
> Explorer pads out with the %20 - netscape does not - in fact netscape
> only works if a + appears instead. Netscape and Explorer  add the +  if
> a form field is used instead (similar to that at the top of the zope
> site etc)
> 
> So my question to the gurus is is there an attribute or expression I can
> use to get round this? How can I specify that the two (or more) words in
> a keyword phrase are separated by pluses when the link is generated?

Use `url_quote' attribute:



PM


___
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] Zope-help

2000-07-06 Thread Bruno Nana

Please would you help me to resolv this problem.
That is that some search im Database after you chose a group of letters:
<<<


 
alphabetisch

  alle Firmen
  beginnend mit A-D
  beginnend mit E-H
  beginnend mit I-L
  beginnend mit M-P
  beginnend mit Q-T
  beginnend mit U-Z


>>>
I have this in web.

And in the ZMethod i have this:
select *
from iekunde

where (substring(firma,1,1)=substring(,1,1) or
substring(firma,1,1) > substring(,1,1)) and
(substring(firma,1,1)=substring(,3,1) or
substring(firma,1,1) < substring(,3,1))


And the error is this:

Error Type: Error
Error Value: Error processing select * from iekunde where
(substring(firma,1,1)=substring(UuZ,1,1) or substring(firma,1,1) >
substring(UuZ,1,1)) and (substring(firma,1,1)=substring(UuZ,3,1) or
substring(firma,1,1) < substring(UuZ,3,1)) Invalid column name 'UuZ'.
Invalid column name 'UuZ'. Invalid column name 'UuZ'. Invalid column name
'UuZ'.

That mean that the operator ">" can only compare two number.
So that my question:
How can convert  substring(UuZ,1,1) ( i mean a string) in a number im zope
Method.
So can i do:
substring(firma,1,1) > substring(UuZ,1,1)
or
substring(firma,1,1) < substring(UuZ,1,1))
when the two member are comparable(number)

Bruno


___
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] Reusing standard_html_header/footer

2000-07-06 Thread Nils Jeppe

On Thu, 6 Jul 2000, Michael Gutmann wrote:

> :-(   Second try: 
>   Well, this gives me the right object, but it isn't rendered. As
>   I reviewed the list archive, I found out, that this seems to be
>   normal. Maybe somebody can explain why, if he/she has 
>   some sparetime.

I haven't tried this and I am FAR from being a Zope expert. But, did you
try dtml-call? Shouldn't that work?




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




  1   2   >