Re: [Zope] Python Script comments

2000-11-26 Thread Evan Simpson

From: "Chris Withers" [EMAIL PROTECTED]
 Is there going to be a python methdos help tab eventually?

Help is on the way.

 If I specify parameters 'wibble, fish', and then do:

 dtml-var "mypythonmethod('wibble',1)"

 ...will wibble='wibble' and fish=1 in the method?

Yep.  Parameters work normally.

 Will the bound names still be bound to what they would have been, had I
 just done dtml-var mypythonmethod ?

 Likewise, if I do:
 dtml-let wibble='wibble', fish="1"
 dtml-var mypthonmethod
 /dtml-let

This is tied up in whether you bind the "caller's namespace" in the Bindings
tab.  If you do, then calling by name, as above, will automatically look the
parameters up in the namespace, so your example will work.  If you don't
bind the namespace (it isn't bound by default) you can only call by name if
there are no parameters.

Go to the demo site -- try it out!

 Finally, I'm not sure, from a user confusion point of view that allowing
 bound names to also appear in the parameter list is a good idea...

They shouldn't, you're right. I'll take care of that soon.

Cheers,

Evan @ digicool


___
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 Script comments

2000-11-23 Thread Chris Withers

Evan Simpson wrote:
 
 so it's official.  Zope 2.3 will introduce "Python Script"
 objects.

Sounds good enough to me :-)

When do DTML Methods become DTML Scripts?
(never, hopefully ;-)

 There will be no "Unrestricted" vs. "Restricted".  If you
 want to write unrestricted code, you can use a good old
 External Method, or write a small module and import it in a
 Script object.

:-)

 password, and you'll get your own private area in a trunk
 CVS checkout of Zope in which to play.

Is there going to be a python methdos help tab eventually?
The bindings tab looks very cool, by the way :-))

Interested about the parameters box...

If I specify parameters 'wibble, fish', and then do:

dtml-var "mypythonmethod('wibble',1)"

...will wibble='wibble' and fish=1 in the method?
Will the bound names still be bound to what they would have been, had I
just done dtml-var mypythonmethod ?

Likewise, if I do:
dtml-let wibble='wibble', fish="1"
dtml-var mypthonmethod
/dtml-let

...will it have the same effect?

Finally, I'm not sure, from a user confusion point of view that allowing
bound names to also appear in the parameter list is a good idea...

Apart from that, looks very cool :-)

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 )