[Zope-dev] tal:define for a dictionary of dictionaries

2002-09-05 Thread Anton Hughes

Further to my earlier question about creating a dictionary of dictionaries
(which is working now - thanks very much!), I am now doing the ZPT to draw
it. But I'm not sure how to make this d-o-d, which is returned by a
PythonScript in the same directory, available. This is what I have so far:


  
Time

 Resource

  
  
#

 ***

  


(resources and timeslots are ZSQLMethods)

*** this is where I want 'bookings[slot/slot_name][resources/name]' to
return a person's name (or not).

The PythonScript accepts one parameter (a date) and is called
render_bookings.

Can someone please get me that final 5% of the way there?

Thanks
Anton


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



[Zope-dev] Problem with structured-text on RedHat

2002-09-05 Thread Arthur Tomas

i have a big problem using structured-text on 
Redhat Linux. I need german and french characters,
which are not correctly represented.
Each word with special character is ignored, for
example: **Köln** ist not translated to:
Köln. What I get to see is
still **Köln**, so it will not be translated.

I set LC_ALL evironment-variable
to "de_DE" or "fr_FR" or "", I try to start ZOPE
calling "start -L "de_DE" - does not help.
There are also "locales"-directories on my machine
with right files for de_DE, fr_FR and so on ...

It works correctly on W2K or NT4 with start.bat -L "",
but no chance for RedHat Linux... I tried 2 last
Versions of RedHat... Any Ideas? Is there some other
settings, which could help?

Best Greetings
ATOM

-- 
Replay To: [EMAIL PROTECTED]
__
WEB.DE MyPage - Ultimatives Kommunikationstool! Ihre Message sofort
online! Domain aenderbar! http://www.das.ist.aber.ne.lustige.sache.ms/


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



RE: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes

Thanks Andy,

> Error Type: TypeError
> Error Value: unsupported operand type(s) for -

>  resource = row['resource'] - 1
  ^^^
That was pretty stupid of me. A hangover from my earlier attempt at a 2D
array :(

Anton






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



Re: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Andy McKay

> Error Type: TypeError
> Error Value: unsupported operand type(s) for -

>  resource = row['resource'] - 1

You should check that row['resource'] is a data type that supports
subtraction. If for example row['resource'] is a string, this will raise the
error. Try: resource = int(row['resource']) - 1
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca




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



RE: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes

Hmmm. I posted code on the end of that message. I don't know what
happened to it. Anyway, I'll post the code here:

#parameters: booking_date
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

bookings = {}   # declare the bookings dictionary
resource_hash = {} #declare the resource dictionary

#populate bookings dictionary with timeslot keys
for row in context.resources():
  resource = row['name']
  resource_hash[resource] = ''

#populate bookings dictionary with timeslot keys
for row in context.timeslots():
  slot = row['slot_name']
  bookings[slot] = resource_hash

#fill the bookings dictionary of arrays with actual bookings
for row in context.getBookings(on_date=booking_date):
 slot = row['timeslot']
 resource = row['resource'] - 1
 person = ['person']
 bookings[slot][resource] = person

return bookings

Error:
==
Error Type: TypeError
Error Value: unsupported operand type(s) for -

Traceback (innermost last):
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 114, in publish
  File D:\ongaku\lib\python\Zope\__init__.py, line 159, in
zpublisher_exception_hook
(Object: bookings)
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 98, in publish
  File D:\ongaku\lib\python\ZPublisher\mapply.py, line 88, in mapply
(Object: render_bookings)
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 39, in call_object
(Object: render_bookings)
  File D:\ongaku\lib\python\Shared\DC\Scripts\Bindings.py, line 252, in
__call__
(Object: render_bookings)
  File D:\ongaku\lib\python\Shared\DC\Scripts\Bindings.py, line 283, in
_bindAndExec
(Object: render_bookings)
  File D:\ongaku\lib\python\Products\PythonScripts\PythonScript.py, line
302, in _exec
(Object: render_bookings)
(Info: ({'script': , 'context':
, 'container': , 'traverse_subpath': []}, ('9/9/02',), {}, None))
  File Script (Python), line 23, in render_bookings
TypeError: (see above)


Thanks again,

Anton


-Original Message-
From: Andy McKay [mailto:[EMAIL PROTECTED]]
Sent: Friday, 6 September 2002 3:12 PM
To: Anton Hughes; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Trouble populating a dictionary of dictionaries


> After playing around for too long on it, I can't seem to get it to work. I
> even tried pre-filling the d-o-d with empty strings. I just don't
understand
> what I am doing wrong.

Its really rather hard to say if you dont show us some code ;)
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca



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



Re: [Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Andy McKay

> After playing around for too long on it, I can't seem to get it to work. I
> even tried pre-filling the d-o-d with empty strings. I just don't
understand
> what I am doing wrong.

Its really rather hard to say if you dont show us some code ;)
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca



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



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread Max M

Jeffrey P Shell wrote:

>Um, how does one escape * in STX-NG?  As in - what if one is entering an
>equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
>x?
>  
>

I don't remember the inline code markup, but isn't it something like:

'2 * 2 * 3 = 12'

Or perhaps backticks?


regards Max M



"Skeptic Effect" or the "Randi Effect"
When a skeptic is near, supernatural effects seem to disappear.
  
>
  >>




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



[Zope-dev] Trouble populating a dictionary of dictionaries

2002-09-05 Thread Anton Hughes

Hi All,

I'm trying to implement a computer booking system for staff members here. At
the moment I have a table with date, timeslot (eg 8:00 - 9:00), resource
(eg. PC 1) and person. I want to draw a table showing the bookings for the
day looking something like this:

|Time| PC 1 | PC 2 | PC 3 |
++--+--+--+
|8:00|  AH  |  |  |
++--+--+--+
|9:00|  |  BC  |  MD  |
++--+--+--+  etc...

I thought the best way to do it would be use the table to populate a
dictionary of dictionaries like:

booking['8:00']['PC 1'] = 'AH'

Then when I'm rendering the table using ZPT I can use a nested loop to look
through the timeslots and resources and fill table cells with the
booking[slot][resource] value if it exists.

After playing around for too long on it, I can't seem to get it to work. I
even tried pre-filling the d-o-d with empty strings. I just don't understand
what I am doing wrong.

Thanks,

Anton

Code:
=

#parameters: booking_date
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

bookings = {}   # declare the bookings dictionary
resource_hash = {} #declare the resource dictionary

#populate bookings dictionary with timeslot keys
for row in context.resources():
  resource = row['name']
  resource_hash[resource] = ''

#populate bookings dictionary with timeslot keys
for row in context.timeslots():
  slot = row['slot_name']
  bookings[slot] = resource_hash

#fill the bookings dictionary of arrays with actual bookings
for row in context.getBookings(on_date=booking_date):
 slot = row['timeslot']
 resource = row['resource'] - 1
 person = ['person']
 bookings[slot][resource] = person

return bookings

Error:
==
Error Type: TypeError
Error Value: unsupported operand type(s) for -

Traceback (innermost last):
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 114, in publish
  File D:\ongaku\lib\python\Zope\__init__.py, line 159, in
zpublisher_exception_hook
(Object: bookings)
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 98, in publish
  File D:\ongaku\lib\python\ZPublisher\mapply.py, line 88, in mapply
(Object: render_bookings)
  File D:\ongaku\lib\python\ZPublisher\Publish.py, line 39, in call_object
(Object: render_bookings)
  File D:\ongaku\lib\python\Shared\DC\Scripts\Bindings.py, line 252, in
__call__
(Object: render_bookings)
  File D:\ongaku\lib\python\Shared\DC\Scripts\Bindings.py, line 283, in
_bindAndExec
(Object: render_bookings)
  File D:\ongaku\lib\python\Products\PythonScripts\PythonScript.py, line
302, in _exec
(Object: render_bookings)
(Info: ({'script': , 'context':
, 'container': , 'traverse_subpath': []}, ('9/9/02',), {}, None))
  File Script (Python), line 23, in render_bookings
TypeError: (see above)


Anton Hughes

Data Administrator
Childhood Determinants of Adult Health Project
Menzies Centre for Population Health Research
GPO Box 252-23, Hobart Tasmania 7001

Email: [EMAIL PROTECTED]
Web:  http://www.menzies.utas.edu.au/cohort/CDAH.htm
Phone: +61 (0) 3 6226 7761

=+=+=+===+++=+=+
Sattinger's Law:
  It works better if you plug it in.


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



[Zope-dev] RE: [Zope-CMF] Performance problem in ZOPE 2.5.1, 'getOwner' in/lib/python/AccessControl/Owned.py

2002-09-05 Thread Arnar Lundesgaard

> What kind of user folder are you using?

We are using the extensible User Folder.
ZODB Auth BTree Source
Basic Membership Source

  Authentication Type:cookie-based 
 Credential Cache Timeout:600 (We have also tried 0 without much success)
Negative Credential Cache:0

memberdata is the standard CMF with a exUserfolder wrapper for it.



I have just tested the performance with a normal userfolder with only two users, and 
the response was instantaneous as it should be. This seems to be the reason for our 
troubles. :-/

We have about 100k users (many inactive) which we cannot remove, so we would very much 
appreciate experiences with this number of users and similar setups.



  Arnar Lundesgaard

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



[Zope-dev] Re: Future of StructuredText

2002-09-05 Thread David Goodger

Simon Michael wrote:
>>> My two cents - there are some things in rST I would like to have but I
>>> think it has gone too far with it's rules.

Richard Jones wrote:
>> This seems to be a common argument, and I honestly can't understand it. I'm
>> not going argue it here, I'll just point you all to the "primer" document
>> which outlines the basics of ReST:
>> 
>> http://docutils.sourceforge.net/docs/rst/quickstart.html
> 
> Hi Richard,
> 
> It was more an expression of personal taste than an argument.  But I
> didn't understand your not understanding,

I believe Richard is referring to a phenomenon I've experienced as well
(although it's probably not what Simon initially complained about, which was
in fact the *PEP* rules).  Newbies will read through the reStructuredText
spec and gasp, "Too many details!  Too many rules!  Too complex!", followed
by, "Not for me!".  Thanks to Richard, we now have the Primer document
referenced above.  I've just added a note to the beginning of the spec,
basically saying "New Users: read the Primer first!"

There are also the people who complain that reStructuredText is "too
complex", referring to the number of constructs available.  It's not
complex; it's rich.  To the new user, the constructs listed in the Primer
above are sufficient.  But when the user has need for more sophisticated
constructs, they're ready & waiting.  Other markups, like StructuredText,
are much more limited; they reveal their limitations when the user needs
more than a really simple "toy" markup.  reStructuredText aims for a higher
level of completeness and flexibility.  Of course, there are limits inherent
in the premise of readable plaintext, and there are applications for which
these limits rule out the use of reStructuredText.  But reStructuredText
pushes the envelope, allowing for a lot more without resorting to verbose,
ugly, unreadable XML-type markup.

-- 
David Goodger  <[EMAIL PROTECTED]>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/


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



[Zope-dev] Re: [Zope-CMF] Performance problem in ZOPE 2.5.1, 'getOwner' in/lib/python/AccessControl/Owned.py

2002-09-05 Thread Chris McDonough

What kind of user folder are you using?

On Thu, 2002-09-05 at 09:25, Arnar Lundesgaard wrote:
> Hi,
> 
>   as I have written on this list before,  we have had serious
>   performance problems on one of our CMF based sites.
> 



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



Re: [Zope-dev] SWAP issue

2002-09-05 Thread Dieter Maurer

Ahsan Imam writes:
 > After starting zope eveything works fine for a while. Slowly the swap starts to 
 >swell up and after a few hours the machine has to be rebooted. The funny thing is 
 >that free shows that there is almost a gig of RAM free and swap keeps on growing. 
 >After a while the machine simply hangs.
When it is Zope, then restarting Zope should free your swap again.

  This way, you can test whether Zope is the culprit and avoid
  rebooting your computer.

When it is Zope, there probably is a resource leak. There is
the "LeakFinder" product to localize such leaks.


Dieter

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



[Zope-dev] Re: [Zope-CMF] Performance problem in ZOPE 2.5.1, 'getOwner' in /lib/python/AccessControl/Owned.py

2002-09-05 Thread Dieter Maurer

Arnar Lundesgaard writes:
 >   as I have written on this list before,  we have had serious
 >   performance problems on one of our CMF based sites.
Performance problems are best analysed with Zope's profiling support:

Control_Panel --> Debug Information --> Profiling


Sorry, I can not say anything to "getOwner".


Dieter

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



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread R. David Murray

On Thu, 5 Sep 2002, Jeffrey P Shell wrote:
> Doesn't work.  At least, not where I tested it (ZWiki 0.7-ish).  :\

Worked for me.  Using StructuredText.py from 2.7, I think.

--RDM


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



Re: [Zope-dev] Future of StructuredText

2002-09-05 Thread Andreas Jung


- Original Message -
From: "David Goodger" <[EMAIL PROTECTED]>
To: "Richard Jones" <[EMAIL PROTECTED]>; "Max M" <[EMAIL PROTECTED]>; "Andreas
Jung" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, September 05, 2002 06:35
Subject: Re: [Zope-dev] Future of StructuredText


>
> > It's potentially much slower than stx because the latter has been around
for
> > longer and therefore is potentially more tweaked.
>
> I'd say ST (classic, anyhow; never grokked the NG code) is faster simply
> because it does much less. ;-)

In deed - on the other side you could work with caches. Either on the
restructuredText
side to keep the cooked HTML, or you as RAM manager on the Zope level or
Apache/Squid before the Zope instance.

-aj



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



Re: [Zope-dev] Future of StructuredText

2002-09-05 Thread David Goodger

Richard Jones wrote:
> [courtesy cc send to David G, so if I make any blatantly errneous statements
> he can come chase me with the Big Stick :)]

Thanks for being a vocal proponent!

> On Wed, 4 Sep 2002 8:01 pm, Max M wrote:
>> Andreas Jung wrote:
>>> I would be fine to have reStructuredText inside the Zope core (for 2.7)
>>> and to deprecate the current StructuredText in the long run.
>> 
>> +1
> 
> +1 but with the reservations below :)
...
> One of the big issues is that rest isn't optimised.

This is true.  Optimization isn't even on the radar at this point, although
I'd be more than happy if someone were to take a look at it.

> The emphasis so far has been to build it to spec.

True.  That's why there *is* a spec, and why the spec preceded the
implementation.  Even after the implementation of the initial feature set,
whenever new features were added the spec was always updated first.  One of
my biggest problems with ST was its spec, or lack thereof.

> It's potentially much slower than stx because the latter has been around for
> longer and therefore is potentially more tweaked.

I'd say ST (classic, anyhow; never grokked the NG code) is faster simply
because it does much less. ;-)

> I believe migration may be possible - that is, the parser half of rest might
> be mutable enough to make it handle stx blocks and other syntax
> eccentricities. That's a question for David Goodger to answer really.

Compatibility with ST was never a consideration; I took the good ideas and
left the rest.  Except for section structure, reStructuredText is mostly a
superset of ST, but there may be some gotchas.

The reStructuredText parser is built generically enough that it could (with
recoding) handle ST as well.  I don't see the need though.

> As I understand it though, there's ambiguities in stx that the rest parser
> might not interpret in the same manner as the stx parser.

There's ST's use of 'o' as bullet list marker, for one.  Footnotes &
footnote references are different, as are hyperlinks in general.  There are
others I'm sure.

-- 
David Goodger  <[EMAIL PROTECTED]>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/


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



Re: [Zope-dev] SWAP issue

2002-09-05 Thread Ahsan Imam

The kernel is  2.4.7-10.
Zope 2.5 on Red Hat 7.2
python 2.1.3

Here is what I think the problem is:
Some object or code was introduced on Tuesday morning. 
The users are beginners so they could have introduced a never ending loop or something 
of that sort. I turned on profiling to see if thre was anything in particular 
consuming a lot of time. A the top of the list was Connection.py. 

Is there a way catch that non terminating loop? This non-terminating loop is just a 
theory I have. I could be completely wrong. Are there other things I could look at for 
clues.


>>> Toby Dickenson <[EMAIL PROTECTED]> 09/05/02 06:46 AM >>>
On Thursday 05 Sep 2002 2:58 am, Ahsan Imam wrote:
> Hello All,
>
> I am currently running zope 2.5 and python 2.1.3. 

Are you actually seeing the zope processes use too much memory?

2.5.x have a ZODB cache mechanism that does not respond well to memory 
pressure. If your application touches many objects per transaction then 
memory usage may grow out of control. 2.6 improves this significantly.

> The machine has 2 gigs of
> rams and is running on Red Hat 7.2.

Which kernel?

> After starting zope eveything works fine for a while. Slowly the swap
> starts to swell up

Memory that is not being actively used might as well be moved into swap, 
freeing the ram for more productive uses. This does not necessarily indicate 
a problem.

> and after a few hours the machine has to be rebooted.
> The funny thing is that free shows that there is almost a gig of RAM free
> and swap keeps on growing. 

Are you sure you are interpreting the output from 'free' correctly? It is 
often misinterpreted. (please post the output from 'free -m' if you are not 
sure.)

> After a while the machine simply hangs.

> I have recompiled python and zope. Turned on profiling.
> I have looked through the stupid.log. There are no core dumps either. I
> have also tried running zope with one thread.
>
> Does anyone have suggestions.

you havent explained why you think this is a zope problem.


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



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread Andreas Jung

I think there is no dedicated escape mechanism...yet another
design flaw.

-aj

- Original Message -
From: "Jeffrey P Shell" <[EMAIL PROTECTED]>
To: "zope-dev" <[EMAIL PROTECTED]>
Sent: Thursday, September 05, 2002 01:06
Subject: [Zope-dev] Speaking of Structured Annoyances


> Um, how does one escape * in STX-NG?  As in - what if one is entering an
> equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
> x?
> --
> Jeffrey P Shell
> www.cuemedia.com
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


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



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread Jeffrey P Shell

On 9/4/02 9:14 PM, "R. David Murray" <[EMAIL PROTECTED]> wrote:

> On Wed, 4 Sep 2002, Jeffrey P Shell wrote:
>> Um, how does one escape * in STX-NG?  As in - what if one is entering an
>> equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
>> x?
> 
> How about '2 * 2 * 3 = 12'?

Doesn't work.  At least, not where I tested it (ZWiki 0.7-ish).  :\

-- 
Jeffrey P Shell 
www.cuemedia.com



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



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread R. David Murray

On Wed, 4 Sep 2002, Jeffrey P Shell wrote:
> Um, how does one escape * in STX-NG?  As in - what if one is entering an
> equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
> x?

How about '2 * 2 * 3 = 12'?

--RDM


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



Re: [Zope-dev] Improving product management

2002-09-05 Thread Andy McKay

Thats what ZPM did for a while, the server side stuff on my end is now
broken. It would display a list of products and tell you what version needs
updating. It would be fairly straightfoward to get that running again I
believe if anyone wants to take a gander.
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca


- Original Message -
From: "Eron Lloyd" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Jeffrey Chan" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 3:46 PM
Subject: Re: [Zope-dev] Improving product management


> I think this is a great idea. A good way to start would be to have a tab
> on the Control Panel entitles "Updates", that would make some XML-RPC
> calls to Zope.org, and provide update and hotfix information when
> compared against your running server. Of course, how we know what is
> available is a good question...we would need to see PEPs 241 and 262
> realized I imagine. The current version check wouldn't need this,
> however. Let's see some Web Services!
>
> Eron
>
> On Wed, 2002-09-04 at 18:25, Andy McKay wrote:
> > Ive discussed this long ago and started off ZPM to do that. However at
the
> > time PyPPM wasnt done and distutils wasn't standard. My enthusiasm ran
out
> > and there was this work conflict thing ;)
> >
> > Zope.org doesn't really have a good product querying system, something
like
> > Gideon is sorely needed.
> >
> > > | Just a thought. How u guys would consider the possibility.
> >
> > We would love the possibility, go to it ;)
> > --
> >   Andy McKay
> >   Agmweb Consulting
> >   http://www.agmweb.ca
> >
> >
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> > ---
> > [This E-mail scanned for viruses by Declude Virus]
> >
> >
>
>
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>



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



Re: [Zope-dev] SWAP issue

2002-09-05 Thread Toby Dickenson

On Thursday 05 Sep 2002 2:58 am, Ahsan Imam wrote:
> Hello All,
>
> I am currently running zope 2.5 and python 2.1.3. 

Are you actually seeing the zope processes use too much memory?

2.5.x have a ZODB cache mechanism that does not respond well to memory 
pressure. If your application touches many objects per transaction then 
memory usage may grow out of control. 2.6 improves this significantly.

> The machine has 2 gigs of
> rams and is running on Red Hat 7.2.

Which kernel?

> After starting zope eveything works fine for a while. Slowly the swap
> starts to swell up

Memory that is not being actively used might as well be moved into swap, 
freeing the ram for more productive uses. This does not necessarily indicate 
a problem.

> and after a few hours the machine has to be rebooted.
> The funny thing is that free shows that there is almost a gig of RAM free
> and swap keeps on growing. 

Are you sure you are interpreting the output from 'free' correctly? It is 
often misinterpreted. (please post the output from 'free -m' if you are not 
sure.)

> After a while the machine simply hangs.

> I have recompiled python and zope. Turned on profiling.
> I have looked through the stupid.log. There are no core dumps either. I
> have also tried running zope with one thread.
>
> Does anyone have suggestions.

you havent explained why you think this is a zope problem.

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



Re: [Zope-dev] Improving product management

2002-09-05 Thread Eron Lloyd

Is that code sitting anywhere? I'd like to take a look at it.

Thanks,

Eron

On Thu, 2002-09-05 at 01:37, Andy McKay wrote:
> Thats what ZPM did for a while, the server side stuff on my end is now
> broken. It would display a list of products and tell you what version needs
> updating. It would be fairly straightfoward to get that running again I
> believe if anyone wants to take a gander.
> --
>   Andy McKay
>   Agmweb Consulting
>   http://www.agmweb.ca
> 
> 
> - Original Message -
> From: "Eron Lloyd" <[EMAIL PROTECTED]>
> To: "Andy McKay" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; "Jeffrey Chan" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, September 04, 2002 3:46 PM
> Subject: Re: [Zope-dev] Improving product management
> 
> 
> > I think this is a great idea. A good way to start would be to have a tab
> > on the Control Panel entitles "Updates", that would make some XML-RPC
> > calls to Zope.org, and provide update and hotfix information when
> > compared against your running server. Of course, how we know what is
> > available is a good question...we would need to see PEPs 241 and 262
> > realized I imagine. The current version check wouldn't need this,
> > however. Let's see some Web Services!
> >
> > Eron
> >
> > On Wed, 2002-09-04 at 18:25, Andy McKay wrote:
> > > Ive discussed this long ago and started off ZPM to do that. However at
> the
> > > time PyPPM wasnt done and distutils wasn't standard. My enthusiasm ran
> out
> > > and there was this work conflict thing ;)
> > >
> > > Zope.org doesn't really have a good product querying system, something
> like
> > > Gideon is sorely needed.
> > >
> > > > | Just a thought. How u guys would consider the possibility.
> > >
> > > We would love the possibility, go to it ;)
> > > --
> > >   Andy McKay
> > >   Agmweb Consulting
> > >   http://www.agmweb.ca
> > >
> > >
> > >
> > > ___
> > > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > > http://lists.zope.org/mailman/listinfo/zope-dev
> > > **  No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope )
> > > ---
> > > [This E-mail scanned for viruses by Declude Virus]
> > >
> > >
> >
> >
> > ---
> > [This E-mail scanned for viruses by Declude Virus]
> >
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
> 
> 
> ---
> [This E-mail scanned for viruses by Declude Virus]
> 
> 
-- 
Eron Lloyd
Technology Coordinator
Lancaster County Library
[EMAIL PROTECTED]
Phone: 717-239-2116
Fax: 717-394-3083

---
[This E-mail scanned for viruses by Declude Virus]


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



[Zope-dev] Performance problem in ZOPE 2.5.1, 'getOwner' in /lib/python/AccessControl/Owned.py

2002-09-05 Thread Arnar Lundesgaard

Hi,

  as I have written on this list before,  we have had serious
  performance problems on one of our CMF based sites.

For a long time we believed that this was mostly due to load, and
differences in our application. Unfortunately the more we searched for
answers the less we understood. Recently we have converted to a ZEO
setup, and that has made it much easier to locate hotspots in the
application.

One of things we have seen, is in our skinned 'folder_contents', which
includes the name of the objects owner. This is fetched by using the
'Creator' method from the DublinCore mixin. This again calls getOwner
of 'AccessControl/Owned.py'.


On the first site we have set up (using the same application, whose
performance currently is quite good) and folder_contents is virtualy
instantaneous. Therefore we tried using the default skin. The
difference was astonishing, and we are seeing a difference of 20-30
seconds.

We started removing functionality, and we quickly found the culprit.


In the CVS log for Owned.py it says (around 1.15.10.2):

   Remove cache from getOwner, since it would
   have cached both unwrapped and wrapped
   objects (caching wrapped objects being a
   bad thing)


This change seems to be the difference between our two sites, and it
will also affect other parts of our application. For instance when we
reindex objects on change, since Creator is both an index and a
metadata field.


Can we simply change this file? What are the consequences of having or
not having the cache?



  Arnar Lundesgaard

-
phone: (+47) 982 38 036
mailto:arnar.lundesgaard(at)creuna.no
Creuna as
Bryggegata 3
NO-0250 Oslo
phone office: (+47) 23 23 88 00
fax: (+47) 23 23 88 50
http://www.creuna.no/

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



[Zope-dev] SWAP issue

2002-09-05 Thread Ahsan Imam

Hello All,

I am currently running zope 2.5 and python 2.1.3. The machine has 2 gigs of rams and 
is running on Red Hat 7.2. 

After starting zope eveything works fine for a while. Slowly the swap starts to swell 
up and after a few hours the machine has to be rebooted. The funny thing is that free 
shows that there is almost a gig of RAM free and swap keeps on growing. After a while 
the machine simply hangs.

I have recompiled python and zope. Turned on profiling.
I have looked through the stupid.log. There are no core dumps either. I have also 
tried running zope with one thread.

Does anyone have suggestions. 

Thanks

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



Re: [Zope-dev] Future of StructuredText

2002-09-05 Thread Casey Duncan

On Thursday 05 September 2002 03:45 am, Max M wrote:
[snip]
> 
> In userland indentation is actually a hard problem.
> 
> 
> regards Max M
 http://lists.zope.org/mailman/listinfo/zope )

Indeed, most normal humans have trouble with understanding nested hierarchies. 
Something which we geeks often cannot understand since we surround ourselves 
with them.

-Casey


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



[Zope-dev] Re: Future of StructuredText

2002-09-05 Thread Richard Jones

On Thu, 5 Sep 2002 1:23 pm, Simon Michael wrote:
> Simon Michael <[EMAIL PROTECTED]> writes:
> > The doc I read listed a large number of rules, including many that seemed
> > to want to exert more control over my text than they should.  (I had a
>
> I tracked it down - it was the example rST PEP posted in comp.lang.python.
> So that would explain it. I read stuff like the below as being part of
> rST, when presumably they are a PEP thing.

You are correct - the formatting restrictions have been carried over from PEP 
9 to PEP 12.


Richard


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



Re: [Zope-dev] Future of StructuredText

2002-09-05 Thread Max M

Richard Jones wrote:

>One of the big issues is that rest isn't optimised. I don't know what the 
>scope is for optimising rest, nor have I got any real benchmark numbers. The 
>emphasis so far has been to build it to spec. It's potentially much slower 
>than stx because the latter has been around for longer and therefore is 
>potentially more tweaked. The ReStructuredText Document works because I 
>compile the source text into HTML when it's written. Nice and fast, and works 
>well in content management environments. In the above DTML tag usage though, 
>you'd want "content" to be quite small or the performance hit could be large.
>

Well I have seen the alternative... and it isn't nice!

The users happily paste in 300KB of obscure html from word.

Html that is about 15 KB when run through Tidy that is!

Besides, most of the stx documents I see my users paste in in real life 
is a few KB worth of text. Max... And the advantage is that REST has a 
syntax that is much closer to what ordinary users expect.

In userland indentation is actually a hard problem.


regards Max M



"Skeptic Effect" or the "Randi Effect"
When a skeptic is near, supernatural effects seem to disappear.
  
>
  >>




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