Re: [Zope] Something missing in Python Methods

2001-01-02 Thread Pierre-Julien Grizel


Hi, Curtis...


You're right for the word "method"... But that's in fact why they are
not called "methods" anymore ! :-))

Don't blame Python Script team : it's a non-trivial problem, both for
security and... feasibility reasons !

I don't know wether it actually works for Python Methods, but you should
try to pass your environment, just as you would for DTML Methods, like
this :

dtml-var "MyPythonMethod (_.None, _)"


And then you should gain access to Zope environment. But remember this
is not elegant and may lead you to security problems.



Regards,


P.-J.


Curtis Maloney wrote:
 
 Greetings
 
 Yeh, yeh.. I know.. I should be using Python Scripts, or whatever... but for
 various reasons, I'm still using 2.1.6...
 
 What I want to know is, why can't Python Methods refer to anything not
 explicitly passed to them?  I don't want to have to make everything that
 invokes the method have to know to pass it half a dozen objects.
 
 Isn't the idea of a method to be executed in the namespace of it's parent?  I
 want my method to be able to access objects in it's own folder...
 
 What am I missing?
 
 Curtis
 
 ___
 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 )

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] UNEXPECTED: Acquisition.Explicit may acquire implicitly

2001-01-02 Thread Pierre-Julien Grizel

Dieter Maurer wrote:
 
 While trying to understand, what the "bself= self.aq_explicit"
 in "OFS.DTMLMethod.__call__" should do, I detected an unexpected
 behaviour:
 
 usually, this "bself" acquires implicitly from
 its container (though not from its context)
 
 More precisely:
 
 if "bself.aq_self" is itself an implicit acquisition
 wrapper, the "bself.aq_explicit" acquires implicitly
 from "bself.aq_self.aq_parent".
 
 The following Python module demonstrates the behaviour:
 
 ---
 from Acquisition import Implicit
 
 class C(Implicit): pass
 
 b= C()
 b.i= 0
 b.d= C()
 b.h= C()
 
 e_bd= b.d.aq_explicit
 try:
 e_bd.i
 print 'e_bd implicitly acquired i'
 except AttributeError: pass
 
 e_bhd= b.h.d.aq_explicit
 try:
 e_bhd.i
 print 'e_bhd implicitly acquired i'
 except AttributeError: pass
 ---
 
 At first, I thought this were a bug.
 At second thought, however, it appears to be quite
 natural, though unexpected:
 
 if o is self.__of__(parent), then
 getattr(o.aq_explicit,k) = getattr(self,k).__of__(o)
 
 If "self" is an implicit wrapper itself,
 then acquisition may be used to look up "k".
 
 This implies, that the idiom
 
 dtml-if "_.hasattr(o.aq_explicit,)"
 
 cannot be used safely to test, whether "o" has attribute
  itself (rather than acquired it).
 We probably should have a standard function for this kind
 of test.



Mhhh  Something like "dtml-if "_.hasattr(o.aq_base,)"" ?




P.-J.



 
 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 )

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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 meaning of Zope

2000-12-27 Thread Pierre-Julien Grizel

Takashi Veikko Linzbichler wrote:
 
 Bill Welch wrote:
 
  Here's what some Americans think it means. From ARTFL Project, Webster's
  1913 Unabridged at
  http://humanities.uchicago.edu/forms_unrest/webster.form.html
 
  Zope (?), n. [G.] (Zoöl.) A European fresh-water bream (Abramis ballerus).
 
 Which is correct. It's a fish living mostly in the danube regions and
 eastward of that. BTW, a lot of bones, not very delicate flesh :-(
 
 But I'm really surprised at the fact that anyone outside middle-/eastern
 europe ever noticed the existence of this creature :-)
 



Paul told us at the Paris Zope conference that it was in fact a Britain
word.


But does anyone know the actual meaning of "Zope" in Britain ???




P.-J.





 ta
 
 --
 smartferret it-consulting Dipl.-Ing. Linzbichler KEG
 
 Dipl.-Ing. Takashi Veikko Linzbichler
 Tannhofweg 28/3
 A-8044 Graz, Austria
 
 Tel.:   0316 / 39 89 40 -0
 Fax:0316 / 39 89 40 -20
 Mobil:  0676 / 31 26 286
 eMail:  [EMAIL PROTECTED]
 
 WWW:http://www.smartferret.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 )

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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 meaning of Zope

2000-12-26 Thread Pierre-Julien Grizel


From Paul, Zope is a britain word, taken in an English/Britain
dictionnary...


Paul, can you give us the actual meaning of "Zope" in Britain ?



Thanks,


P.-J.




Bob Sidebotham wrote:
 
 From http://www.kabalarians.com/male/zope.htm
 
 Zope
 
 Your first name of Zope has given you an expressive, diplomatic, and
 refined nature. Although you have a good appreciation of material
 values, business ability, and skill in organizing and managing others,
 your success is restricted by a lack of self-confidence and initiative.
 You have very expensive tastes, and your desires could well exceed your
 initiative in providing for them through your own efforts. Personal
 appearance is important to you. You are always well-groomed yourself,
 and you judge others by your own standard. You do not like to rough it
 or use much physical energy. Through your diplomatic ways you are able
 to call on the assistance of others to avoid such matters. You have
 good business judgment but lack the confidence to carry out your own
 ideas unless assisted by an associate. From a desire to eat too many
 rich foods, your health could suffer through kidney and generative
 troubles or any problems affecting the fluid functions of the body.
 
 Bob Sidebotham
 [EMAIL PROTECTED]
 
 __
 Do You Yahoo!?
 Yahoo! Shopping - Thousands of Stores. Millions of Products.
 http://shopping.yahoo.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 )

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] [OT] New kind of Bud Wazzup ad ?

2000-12-22 Thread Pierre-Julien Grizel



What about making a "wazzup" remake but saying WAZZZOPE ?




(just kidding)



P.-J.

dtml-true, dtml-true...


-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Publish.py / publish hack

2000-10-30 Thread Pierre-Julien Grizel



Hi,


I'm using Zope 2.2.2 and for some personal reasons I need to patch the
publish function from Publish.py.
I used the usual __init__.py straegy to patch ZPublisher :


from MyModule import Mypublish
import ZPublisher.Publish
from ImageFile import ImageFile

# Patch the original publish function
ZPublisher.Publish.publish = Mypublish


But the fact is, publish is called several times at several places in
the source code, and especially from the publish_module function when an
exception is raised...
And, although my patch works most of the times, it doesn't work when an
exception is raised.

I may need to replace another 'publish' reference somewhere, but does
anyone know WHERE exactly ??


Many thanks,



P.-J.



-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Reverse SendMail Question

2000-10-26 Thread Pierre-Julien Grizel

[EMAIL PROTECTED] wrote:
 
 Has anyone thought of using SendMail (or any other e-mail program) to send
 e-mail to Zope and have that e-mail be loaded directly into a specific folder
 (say, based on the e-mail address or subject line)?
 
 This would be handy to keep track of e-mail.  All the person would have to do is
 cc the project and all the e-mail could be viewed centrally.
 
 Any ideas?
 
 Ron
  ./.
 
 ___
 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 )



What a good idea !!


In fact, I think we should instead allow the sendmail program to serve
HTTP requests !... ;-)


P.-J.


-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] display owner [repost]

2000-10-26 Thread Pierre-Julien Grizel

Patrick Koetter wrote:
 
 Hi all,
 
 I posted this the last days, but didn't get quite what I needed.
 
 I'm looking for a way to get the Owners Name of an object (e.g. DTML-Method
 or -Document etc.) in order to display this to the surfers when they drop
 by.
 
 I've searched through zope.org code, took a look at the Owned.py etc. I just
 can't figure it out. Somebody help me?
 
 Thanks,
 
 p@
 
 ___
 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 )



Yes, not so obvious, but this might work :



dtml-if get_local_roles
dtml-in get_local_roles
dtml-if "'Owner' in _['sequence-item'] and _['sequence-key'] !='za'"
dtml-if one_owner_already_mentioned
dtml-else
Managed by
dtml-call 
"REQUEST.set('one_owner_already_mentioned','yes')"
/dtml-if
dtml-var sequence-keybr
/dtml-if
/dtml-in
/dtml-if
/dtml-if


This is based on a previous post (about a year ago ?...) by someone else
I cannot thank - as I cannot remember his name ! :-))



P.-J.



-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] IIS and Zope share same problem :-S

2000-10-20 Thread Pierre-Julien Grizel


Hum... A possible way to solve this problem is to practice the "you
can't do ANYTHING but..." policy... And, thus, according proxy roles to
the methods that must access it, such as index_html.
I know it's constraining but with a little work we can end up with
something quite secure  secret.




P.-J.



Chris Withers wrote:
 
  MICROSOFT WEBSERVERS LAID OPEN FOR ALL TO SEE
  by Dave Murphy, [EMAIL PROTECTED]
 
  Microsoft is scrambling to repair damage caused by a
  security hole in its IIS 4  5 webserver that runs on
  Windows NT/2000. Microsoft claims over four million
  IIS websites, and each one of them is at risk of
  releasing sensitive data through the security hole.
  Called the "Web Server Folder Traversal" error, the
  flaw allows users to execute files on an IIS website by
  requesting a specific web address.
 
 http://www.zope.org/standard_html_header for example ;-)
 http://www.zope.org/objectIds as another...
 
  The bug allows access to any file on the webserver via
  a specified URL. Like all webservers, IIS is supposed
  to prevent access to files that aren't intended to be
  part of the website.
 
 Maybe Zope should too
 
  This article is posted to http://itrain.org/itinfo/2000/it001017.html
 
  Live well, do good,
 
  --Dave Murphy
 
 cheers,
 
 Chris
 
 ___
 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 )

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] [OT ?... HTTP ?...] redirect W/ POST data

2000-10-17 Thread Pierre-Julien Grizel


Hi,

[This message may be off-topic Sorry...]



I know how to do a RESPONSE.redirect with GET data (very easy :
RESPONSE.redirect ('url?data=valueso_on=xxx').

But I'd like to do the same with POST data, that is, data that doesn't
show up in the URL. I suppose there is a way to feed RESPONSE.headers
with such data - although I'm not sure of it - but is there a better way
(if there is a way...) to do this ?...



Many thanks,


P.-J.



-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Still need help about Product namespace

2000-10-10 Thread Pierre-Julien Grizel


Hi,


I still need help about my product needing to know its namespace...


Look at the following piece of DTML Meth/Doc :

dtml-let STRING="'Hello, world !'"


dtml-var MyProduct


/dtml-let



Right.

MyProduct is my product's instance, defining the following method :

def __call__ (self, REQUEST=None):
if REQUEST is None:
if kw: REQUEST=kw
else:
if hasattr(self, 'REQUEST'): REQUEST=self.REQUEST
else: REQUEST={}

print STRING

This raises a key error.



I MUST get the STRING variable from the '_' namespace, but how can I
pass IMPLICITLY this namespace to my product ???
Is there a way to acquire _ ???



Many thanks,


P.-J.



-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Namespace within a product... (argh...)

2000-10-10 Thread Pierre-Julien Grizel



Well, beeing very straightforward, I read this, in
OSFP/Help/DTMLDocument.py :


"""
A DTMLDocument implicitly pass itself as a client argument in
addition to the specified client, so names are looked up in
the DTMLDocument itself.

Passing in a namespace to a DTML Document is often referred to
as providing the Document with a *context*.

DTML Documents are called three ways:

  From DTML -- A DTML Document can be called from another DTML
Method or Document::

  dtml-var standard_html_header
dtml-var aDTMLDocument
  dtml-var standard_html_footer

In this example, the Document 'aDTMLDocument' is being
called
from another DTML object by name.  The calling method
passes the value 'this' as the client argument and the
current DTML names pace as the REQUEST argument.  The above
is identical to this following usage in a DTML Python
expression::

  dtml-var standard_html_header
dtml-var "aDTMLDocument(_.None, _)"
  dtml-var standard_html_footer

  From Python -- Products, External Methods, and PythonMethods 
can call a DTML Document in the same way as calling a DTML
Document from a Python expression in DTML; as shown in the
previous example.

  By the Publisher -- When the URL of a DTML Document is fetched 
from Zope, the DTML Document is called by the publisher.
The REQUEST object is passes as the second argument to the 
Document.  
"""

So - I had a look at DTMLDocument.py and saw the following method :

def __call__ (self, client = None, REQUEST = {}, **kw):
...

SO - I try to create this method for my product :

def __call__ (self, client = None, REQUEST = {}, **kw):
print client
print REQUEST


and it prints :
None
{}


It seems that in fact the DTML document doesn't actually pass _.None and
_ to my object. WHY ??

How can I enforce DTML Docs/Meths to pass it anyway ???



Many thanks,


P.-J.




-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Still need help about Product namespace

2000-10-10 Thread Pierre-Julien Grizel

Toby Dickenson wrote:
 
 On Tue, 10 Oct 2000 10:51:09 +0200, Pierre-Julien Grizel
 [EMAIL PROTECTED] wrote:
 
 I still need help about my product needing to know its namespace...
 
 You also need to read the answers already provided.
 
 http://www.zope.org/Members/htrd/howto/FunctionTemplate
 


I saw your answer and I did downloaded your program... But it still
doesn't work, the dtml-let statement doesn't have any effect on the
namespace the TemplateClass instance fetches.

But maybe is there a different way to 'call' my product, than doing a
dtml-var ? 
I double-checked that you had the same problem as me : when doing a
dtml-var on a TemplateClass instance, neither client nor context are
passed...



Anyway, many thanks for your work, it has been useful for me
understanding the TemplateDict mechanism.


P.-J.


-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Name lookup emulation with a Product

2000-10-05 Thread Pierre-Julien Grizel

Hi,


I'd like to perform a name lookup inside a product, relying on
acquisition, property and REQUEST lookups.

In fact, I want to use the DTML Reference / Table 7 schema to look-up
variables.


I know how to perform REQUEST lookups.
I know how to perform object properties lookups.
I know how to perform acquisition lookups.

I could write a method of my own to try to imitate the Zope process, but
is there an already existing method (that would be used by the dtml-var
source code, for example), that already does the job for me ?

I found the BaseRequest / traverse method that seems to do it, but is
there a convinient way to call it ?


Many thanks,




Pierre-Julien



-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Name lookup emulation with a Product

2000-10-05 Thread Pierre-Julien Grizel

Chris Withers wrote:
 
 Pierre-Julien Grizel wrote:
 
  Hi,
 
  I'd like to perform a name lookup inside a product, relying on
  acquisition, property and REQUEST lookups.
 
 Are you talking about a python product's __call__ method, by any chance?
 
 Chris


Ahem... Not exactly...
I want my product to be callable with two method, say "m1" and "m2",
that perform different tasks.
And, inside those methods, I need to check some variables, which may be
of several kinds (REQUEST, properties  so on).

If found little help in the mailing list history :
http://www.egroups.com/message/zope/40811
It references a mysterious (for me !) "md" attribute, which relates to
the namespace. Uh, uh... Maybe is there a way to do what I want with
this ?...
...But how ?.



Thanks,


P.-J.

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Name lookup emulation with a Product

2000-10-05 Thread Pierre-Julien Grizel

Chris Withers wrote:
 
 Pierre-Julien Grizel wrote:
 
  I want my product to be callable with two method, say "m1" and "m2",
  that perform different tasks.
 
 How would these methods be called?
 
 Chris


Well, I've got my product P somewhere in my object hierarchy.

Its methods _should_ be called dtml-var "P.m1 (param1)"

where param1 is a string parameter my method needs to know.

I'd like to avoid the _.None and _ stuff if there is a way to do so.


I looked at the __call__ method (and read the 'isDocTemp' thread ;-)  )
and, if I must, I can replace m1 and m2 with a __call__ method taking
another parameter specifying what kind of action it has to do.



Many thanks,


P.-J.


-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] _ in a product

2000-10-05 Thread Pierre-Julien Grizel



Hi,


Correcting my earlier post, I'd "simply" like to have a way to get the _
(namespace) variable in a product method.
Currently, I use the following syntax :

dtml-var "product.method (_, 'Hello, world !')"

to pass _ to my product.

It works, but. Reminds me of the great times when my hammer was the
dtml-method..




Has anyone a way to acquire _ in a product without constrainging the
user to pass it explicitly ??




blub-blub-blub-blub..






P.-J.

-- 
If the only tool you have is a hammer, 
you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
vous avez tendance à voir chaque problème comme un clou. 
   --Abraham Maslow

___
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] Object serialization between different pages

2000-09-12 Thread Pierre-Julien Grizel

Hi,

Is it possible to serialize an object to share it across several pages ?
This would allow one to pass the serialized object via the URL, and to
retreive it in the form that would process the request.

I know there is the pickle function in python, but is there a more
Zopish way to do this ?



Thanks,


P.-J.

___
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] Images slow rendering problem

2000-09-04 Thread Pierre-Julien Grizel

Hi,

I already posted this message several monthes ago, expecting a new Zope
version would fix the problem, but...


I have some images on my pages (let's say 10 - not a lot), rendered
either by dtml-var or a manual IMG tag.
When I render the page on some of my LAN boxes (especially with IE),
some images doesn't load at the first time. I need to reload the page to
make them appear. When I monkeyly hit the 'F5' key, some images do not
show again. Argl. Anoying

The problem is worst ever through Internet.




Any clues ? Is it a Zope images rendering problem ?



Many thanks,

P.-J.

___
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] Images slow nor not rendering?

2000-09-04 Thread Pierre-Julien Grizel

Chris Withers wrote:
 
 Pierre-Julien Grizel wrote:
  I have some images on my pages (let's say 10 - not a lot), rendered
  either by dtml-var or a manual IMG tag.
  When I render the page on some of my LAN boxes (especially with IE),
  some images doesn't load at the first time. I need to reload the page to
  make them appear. When I monkeyly hit the 'F5' key, some images do not
  show again. Argl. Anoying
 
 What version of Zope are you using?
 What version(s) of what browser(s) are you using?
 
 cheers,
 
 Chris


Hi,

I've got the problem with Zope 2.1.6 on a FreeBSD box.
In fact, IE AND NS are affected (all versions, 3, 4, 5...), while NS
less frequently than IE (???).


Many thanks,


P.-J.

___
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] Patch for Netscape 'tree' bug?

2000-08-18 Thread Pierre-Julien Grizel

** Reply to message from [EMAIL PROTECTED] on Fri, 18 Aug 2000
04:36:34 +0100 (BST)

If it was the www.xlogx.org patch, yeah, I know the website is down (because of
a silly man who tried to use Java servlets with Apache, and who broke my Apache
conf files...), but I can email it to anyone asking for (It should be better
putting it in a safe place !).
BTW, I noticed my patch had problems with trees deeper than 3 levels, I should
correct it soon.


Regards,

P.-J.

___
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] Patch for Netscape 'tree' bug?

2000-08-18 Thread Pierre-Julien Grizel

** Reply to message from [EMAIL PROTECTED] on Fri, 18 Aug 2000
04:36:34 +0100 (BST)

[Hoping you didn't receive my previous message.]

If you talk about the www.xlogx.org patch, I've made the site available again,
you can find it at http://www.xlogx.org/Zope/TreeTag.query_expr.patch
Be careful, it has a problem with trees deeper than 3 levels, I think it's not
a big work to correct this but I hate html and I don't have time to do it. I
should take time those weeks, but I can't promise


Regards,


P.-J.

___
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 LDAP Browser

2000-06-05 Thread Pierre-Julien Grizel


Hi,


I wrote in my spare time a LDAP browser with Zope. You can try it at
www.xlogx.org/Zygopetale (it's available in french  english).

You can try it with the default parameters or with an LDAP database of your own
(with write access ?...). 
Please don't rely on my server's speed, it's hidden behind a 64k ISDN
connexion. BTW, if someone wants to host it with a better sever, I do agree !


It took... say... 20 hours to learn LDAP and to build the whole tool (with its
current limitations).


Zope is actually a very very very powerful web server.



P.-J.

___
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 LDAP Browser/Editor

2000-06-05 Thread Pierre-Julien Grizel


Hi,


I wrote in my spare time a LDAP browser with Zope. You can try it at
www.xlogx.org/Zygopetale (it's available in french  english).

You can try it with the default parameters or with an LDAP database of your own
(with write access ?...). 
Please don't rely on my server's speed, it's hidden behind a 64k ISDN
connexion. BTW, if someone wants to host it with a better sever, I do agree !


It took... say... 20 hours to learn LDAP and to build the whole tool (with its
current limitations).


Zope is actually a very very very powerful web server.



P.-J.

___
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 LDAP Browser

2000-06-05 Thread Pierre-Julien Grizel


...Well... You should try again...! I do have connexions !

Here is the URL in a "clickable" form :

http://www.xlogx.org/Zygopetale

If it still doesn't work, then there must be a bug in my multilingual
management...!
You should then enforce english language by trying
http://www.en.xlogx.org/Zygopetale


P.-J.



Timothy Wilson wrote:
 
 On Mon, 5 Jun 2000, Pierre-Julien Grizel wrote:
 
  I wrote in my spare time a LDAP browser with Zope. You can try it at
  www.xlogx.org/Zygopetale (it's available in french  english).
 
 I can't find any sign of an xlogx.org domain. Am I missing something?
 
 -Tim
 
 --
 Tim Wilson  | Visit Sibley online: | Check out:
 Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
 W. St. Paul, MN |  | http://slashdot.org/
 [EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.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 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] dtml-tree query_expr=xxx PATCH !

2000-05-31 Thread Pierre-Julien Grizel


Hi !



In order to solve the problem I mentionned two days ago about the dtml-tree
tag with non-persistant REQUEST.form data, I wrote a patch to apply to the Zope
2.1.6 root source path.



It just adds a new tag attribute, "query_expr", to the dtml-tree tag, and you
can assign this attribute the REQUEST.form value.

Everything is explained on http://www.en.xlogx.org/Zope and the patch (Zope
2.1.6) is downloadable from there.




I hope this helps






P.-J.

___
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] dtml-tree and REQUEST.form

2000-05-30 Thread Pierre-Julien Grizel


Hi,


I'm currently implementing a tree using... dtml-tree.
In the document I use, I just have the tree and a table which desplays results
according both to the tree state and some form data (passed through
REQUEST.form).

I.e. my URLs should look like the following :
http://xxx.xxx/xxx/yyy/zzz/MyPage?MyVar=toto when I first open the page,
and it SHOULD look like
http://xxx.xxx/xxx/yyy/zzz/MyPage?MyVar=totoe-tree=tree-stuff.


You guess - it doesn't look like this at all.
This because the dtml-tree tag doesn't use the REQUEST.form dictionnary data
to build its URLs. Instead, it just discards, in the URLs it builds, every
single GET variable you wish to use.

I'm currently patching the TreeTag.py file to support the REQUEST.form data,
but I'd like to know if someone ever had this problem, and maybe corrected it -
I hate patching.


Also, if there is no other solution, I'd like to know if there are peolple
intersted in this patch.





Thanks,


P.-J.

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