[Zope-dev] DateTime iso8601 bad handling of dates

2005-11-30 Thread Evan Simpson
This has been brought up and (rather cavalierly) dismissed before. I challenge anyone to justify the following DateTime behavior: DateTime('2005-01-01').strftime('%Y-%m-%d') '2004-12-31' DateTimes are actually timestamps, and the current implementation assumes that a date in ISO8601 format

[Zope-dev] Re: ZPT: defer expression fix

2005-04-04 Thread Evan Simpson
Christian Heimes wrote: That's an interessting use case. Do you want me to keep the code and make up a new expression? I'm thinking about lazy:. If you have a particular use for defer: that would justify the split, please go ahead. I have no particular interest in keeping it. Cheers, Evan @

[Zope-dev] Re: ZPT: defer expression fix

2005-04-01 Thread Evan Simpson
Christian Heimes wrote: * DeferWrapper didn't cache the result of the expression like ordinary vars do. This was intended, though you couldn't know that since I never documented this. Consider the following terrible example: div tal:define=xis defer:string:x is $x p tal:repeat=x

[Zope-dev] ZopeGuards iterator problems

2005-01-07 Thread Evan Simpson
I just created issue #1656 and checked in a fix, so looping over enumerate(xrange(9)) is now possible, among other things. Should we add entries for the various iterator types to the security machinery so that iterators returned by the itertools module can be used without lots of tedious

[Zope-dev] Re: Conditional imports in ZTUtils/__init__.py

2004-10-05 Thread Evan Simpson
Stefan H. Holek wrote: ZTUtils/__init__.py contains code like this: if sys.modules.has_key('Zope'): # import things This is causing me repeated headaches when writing tests, because it assumes/dictates a certain module import order. Can this go away, please? I mean we know we are running

[Zope-dev] Re: [ZPT] Re: [Zope3-dev] Re: Re: RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-28 Thread Evan Simpson
Jim Fulton wrote: Given that, I still prefer context#dc to context/##dc. +1 I like the idea that '/' and '#' are both path separators, and that the semantics of each path segment depend on the preceding separator. Cheers, Evan ___ Zope-Dev maillist -

[Zope-dev] Re: [Zope3-dev] Re: Re: RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-27 Thread Evan Simpson
Jim Fulton wrote: IMO, if we take this route, we should think of the notation as providing an alternate traversal operator. That is, there is syntax that either modifies or replaces /, so of the examples above, only: context/*dc/title In that case, I'd be happy to consider adaptation as

[Zope-dev] Re: [ZPT] Re: RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-21 Thread Evan Simpson
Jim Fulton wrote: One disadvantage I see with the cast notation is that it's a bit jarring in: a/b/(adapter)c/d as the adapter is applied to a/b/c. The order just doesn't seem quite right. Unless I'm misunderstanding something fundamental here, in the TALES context an adapter is essentially a

[Zope-dev] Re: [ZPT] RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-20 Thread Evan Simpson
Jim Fulton wrote: I thought you had proposed this, but I couldn't find a proposal or documentation. You say this is implemented in Zope 2? Where is it documented? Actually, it's only implemented on evan-pathprefix-branch. It has been quite a while since I had a chance to work on it, so I had

[Zope-dev] Re: [ZPT] RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-20 Thread Evan Simpson
Jim Fulton wrote: I don't inderstand what motivated the special expression types for this namespace. For example, to get at file-system based code, couldn't you have used the modules variable? I started there, but went with the special expression types because the set of things that are valid

[Zope-dev] Re: [ZPT] RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-19 Thread Evan Simpson
Jim Fulton wrote: I've posted two proposals: http://dev.zope.org/Zope3/TALESPathExpressionAdapters Proposes a mechanism for easily using adapters in TALES expressions. I'm not at all clear on how the proposed mechanism is superior to the implementation of path segment prefixes that exists in

[Zope-dev] test.py

2004-03-10 Thread Evan Simpson
Jeremy Hylton wrote: Make sure App.Product is imported first, so that test.py can work. This change does not affect the old utilities/testrunner.py. This checkin message caused me to notice 'test.py' for the first time. Can you point me to any discussion/docs on it? When did/will it replace

[Zope-dev] Re: Zope 2.8

2004-02-20 Thread Evan Simpson
Christian Theune wrote: - Does a proposal for the post-traverse-hook have a chance for 2.8? (The code is here completely working on 2.7, I only need to write tests.) Please, write tests and merge to the HEAD. I see no reason why this shouldn't go into 2.8. Cheers, Evan @ 4-am

[Zope-dev] TypeErrors during 'make test'

2004-02-13 Thread Evan Simpson
I'm getting several TypeErrors when I run 'make test' on the HEAD. Each of them involves a call to cAccessControl's 'validate' with 'roles' set to a PermissionRole instance, complaining that it's not iterable. Any ideas? Cheers, Evan @ 4-am ___

[Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Evan Simpson
Tim Peters wrote: The globals set up for running the script appear not to contain a '__file__' key, and have a '__name__' key explicitly set to None. If it set either of these to something useful, or didn't have a '__name__' key explicitly set to None, warning.warn() would have been able to make

Re: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Evan Simpson
Tim Peters wrote: it *looks* like you could leave name None, but set '__file__' to something (non-None) explicitly. Thanks! This seems to do the trick, and I have a unit test that fails before and passes after the change. While creating the test, though, I ran across some disturbing behavior.

[Zope-dev] Re: RFC: backward compatibility of PythonScript bindings for 2.6.4 / 2.7.0

2004-01-21 Thread Evan Simpson
Jeremy Hylton wrote: What if you used a special object that would produce a useful error message if the user tries to access the container. I like this. Make it a singleton, and put it in the global namespace for Scripts, so that we can write: if context is Inaccessible: # Do without

[Zope-dev] Re: RestrictedPython globalization change

2004-01-02 Thread Evan Simpson
Tres Seaver wrote: I was just looking with Shane at the code you added in November to address http://collector.zope.org/Zope/445 . It seems to me that this bit of majyk is just confusing, and makes PythonScripts even less like normal Python functions; the actual submitter could easily fix his

[Zope-dev] Re: On with the show....

2003-12-15 Thread Evan Simpson
Sidnei da Silva wrote: If you look at FSPageTemplate, its obvious that it doesn't subclass ZopePageTemplate, but the solution is not so obvious. Using: pt_getContext = ZopePageTemplate.pt_getContext.im_func Wow, FSPageTemplate is lousy with this sort of thing, isn't it? I'd have spelled it

Re: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-10 Thread Evan Simpson
Brian Lloyd wrote: Good call. I think it would be best to make sure the docstring of the new method is clear on its reason for being. I think somewhere there is an interface file that is used to generate some of the api docs - ideally that can get updated too. Done and done! Cheerios, Evan

[Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-09 Thread Evan Simpson
Summary: absolute_url(1) didn't include the path to the virtual root, which broke code that assumed that it could just prepend / in all cases. I changed it to include the base path, and broke code that prepends BASEPATH1. Since the old behavior existed for two years (including part of the 2.7

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-07 Thread Evan Simpson
Yuppie wrote: Yes. getIcon() is the cause of the problem I see: To access the ZMI I use this Apache rule: ProxyPass /zope27 http://localhost:8080/VirtualHostBase/http/example.org:80/VirtualHostRoot/_vh_zope27 getIcon() for a folder in myCMFSite returns 'zope27/myCMFSite/folder_icon.gif' (was

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-03 Thread Evan Simpson
Lennart Regebro wrote: I will check this into head this evening, and unless people scream tomorrow I will check it into the 2.7 branch. Please hold off. I've been meaning to revisit this for a while, and I have a bit of time to do so today and tomorrow. Also, virtual hosting is properly the

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-03 Thread Evan Simpson
Yuppie wrote: You introduced that concept in Zope 2.7. The method docstring is part of your change. Before Zope 2.7, absolute_url was defined different, worked different and was used different in products maintained by ZC. [snip] I don't think the old API was better. I'm just saying that you

[Zope-dev] Re: 2.7.0-b2 - Critical ZPT TAL bug when using content-type text/xml

2003-09-22 Thread Evan Simpson
Richard Waid wrote: Basically, if you're using a ZPT with a content-type text/xml, using a TAL path expression to access an attribute or method causes a security violation (Unauthorized). It does not happen if the ZPT is using content-type text/html. Ah, guarded_getattr is doing something wrong

[Zope-dev] Re: 2.7.0-b2 - Critical ZPT TAL bug when using content-type text/xml

2003-09-22 Thread Evan Simpson
Until cAccessControl.c is fixed, you can work around the problem with a simple patch to Products/PageTemplates/Expressions.py, in restrictedTraverse(): if isinstance(name, TupleType): object = object(*name) continue + + name = str(name) if

Re: [Zope-dev] PythonLibraries Product

2003-09-11 Thread Evan Simpson
Tres Seaver wrote: Hmm, I'm thinking about this for the CMF. In CMF 1.3.x, a template which has a cache manager, or a title, puts those values in a simple 'name=value'-formatted file, with extension '.properties'. Permission mappings go in a separate file, with extension '.security'. I wish I

[Zope-dev] New-style classes and Persistence?

2003-09-11 Thread Evan Simpson
What's the latest word on mixing new-style classes and Persistence? I'm finding type subclassing to be extremely useful in PythonLibraries, but so far I'm only using them for non-persistent objects. For part of what I'm doing, though, it would be nice to be able to chuck the old

[Zope-dev] PythonLibraries Product

2003-09-08 Thread Evan Simpson
I'm thinking seriously about writing a Product to provide collections of Python functions defined by a single source text -- PythonLibraries. This would *not* be the same as Zope 3's persistent modules, although it would provide some of the same benefits. Here's the README.txt: Python

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-31 Thread Evan Simpson
Chris Withers wrote: How would this interact with the Adapters stuff implements in Zope 3's TALES? It wouldn't -- this is a Zope 2 implementation. OK, I know what you mean, but I don't know enough about the Zope 3 implementation to make an informed response. Wouldn't Zope 2's lack of the

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-30 Thread Evan Simpson
Jim Penny wrote: Well, that is exactly why it will be more confusing to everyone. A python programmer is not expecting them to be different, and a non-programmer has no idea of what keys and indices are, much less how they differ. The explanation isn't that hard, at least for a user with a basic

[Zope-dev] Re: simpler TALES. (was Re: TALES idea: tuple unpacking)

2003-07-30 Thread Evan Simpson
Paul Winkler wrote: you don't :) it's a convenience (less stuff to type if you access the object a lot) and/or an optimization (getSomeObject might be expensive). I believe that his example referred to the case where the intermediate object must be called before path traversal can continue.

Re: [Zope-dev] Re: simpler TALES. (was Re: TALES idea: tuple unpacking)

2003-07-30 Thread Evan Simpson
Shane Hathaway wrote: FWIW, I'd write this as here/call:getSomeObject/someAttribute. I suppose it's possible to support both. One interesting difference is that my syntax says both get an attribute and call it, while yours says only call it. Mine is a method call, while yours is a function

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
OK, I've checked in a sample implementation on evan-pathprefix-branch. It allows for registering prefixes with: from Products.PageTemplates.PathPrefixes import registerSubPathPrefix registerSubPathPrefix('call', call_compiler, call_handler) It includes an implementation of 'var:', 'call:',

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
Jim Penny wrote: But, what does all of this have to do with index:, key:, int:, etc.? index: and key: are particularly interesting, in that they use different syntax for something that python conflates syntactically. That is, an integer indexed reference looks exactly like a string indexed

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-23 Thread Evan Simpson
Jim Penny wrote: Hate this. Looks like a typecast of some kind, int is way to overused for this. If you must, why not index: ? Hmmm. I hadn't thought of that before, but I've certainly wanted to tell the path traverser whether to use attribute, index, or key access on several occasions

[Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread Evan Simpson
Shane Hathaway wrote: This seems like a fine idea, but what action would the user take to install examples and extras? In my initial implementation, there was a separate page that listed the names and descriptions of the various examples, with links to install them. If I recall correctly, this

[Zope-dev] Re: weak examples, weak exploits

2003-06-23 Thread Evan Simpson
Casey Duncan wrote: I would be in favor of making the Examples opt-in like the Zope tutorial. It seems silly to have it in evey ZODB by default. Make people add it if they want it. Many, many moons ago I created evan-examples-branch, which allows individual Products to offer sample code without

[Zope-dev] Re: Post-authentication hook

2003-06-10 Thread Evan Simpson
Dieter Maurer wrote: We had discussed the post-authentication hook in connection with role based skin selection but we never had it implemented. I have, and it even fits here in the margin. Shall I pop it into the Collector? 242a243 self._post_traverse = post_traverse = [] 363a365

Re: [Zope-dev] Re: Post-authentication hook

2003-06-10 Thread Evan Simpson
robert wrote: Please do Okeydoke: it's Issue #935. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce

[Zope-dev] Re: [Zope] Re: Proposed installation changes for review

2003-03-11 Thread Evan Simpson
Guido van Rossum wrote: Well, in a typical installation, you won't be running ZEO on the same machine as Zope, right? ZEO has its own install and config stuff, which is very similar to that for Zope, but ZEO is not installed as part of the main Zope install. I routinely run ZEO on all of my

[Zope-dev] Re: [Vote] PEP308 voting began

2003-03-04 Thread Evan Simpson
Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a not:.. expression, surely you can have an if:..:then:..:else:.. expression. Now that you point it out, it's not even hard. Here's a

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-16 Thread Evan Simpson
My trunk and 2.6 sandboxes are now behaving themselves. Thanks, guys! ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
Shane Hathaway wrote: Shot in the dark #2: Does it enter the ClassFactory function in Zope.ClassFactory? That's part of the ZClass magic... although there are two ways that the pickler tries to load classes. ZODB only tries to load Persistent instances as ZClasses. If there are things

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
More data: It may well be loading correctly, but it seems to be storing incorrectly. I managed to grab the ZGlobals pickle string, and it has the _zclass_ stored as a plain class instead of an oid. I copied the commented-out Python persistent_id() in ZODB/Connections.py into a method called

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
I think I've fixed my ZGlobals, but there's definitely a problem in coptimizations. I made Connections.py use the Python persistent_id, restarted twice, and ZGlobals was fine on the second restart. Whew, Evan @ 4-am ___ Zope-Dev maillist -

[Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-10 Thread Evan Simpson
This past weekend I migrated a bunch of ZClasses and the web site that uses them from a scratch Zope instance into my production instance. Both run off the same 2.6 CVS branch checkout, connecting to ZEO servers running from the same ZEO trunk checkout. For a while after starting the server,

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-10 Thread Evan Simpson
Shane Hathaway wrote: My first recommendation would be to turn your ZClass registry into an OOBTree. OOBTree has been maintained and updated. Good thought, but no dice. Since it is rebuilding the registry on every restart anyway, I went ahead and made the changes to my OFS/Application.py. I

[Zope-dev] Re: bug in mapply.py?

2002-11-05 Thread Evan Simpson
Tim Hicks wrote: Given a call signature like: def method(self, *args, **kw) In this way, mapply.py seems to ignore the fact that I want my method to accept an arbitrary number of arguments (line 69). When mapply was written, its only purpose was to map explicit method parameters to request

[Zope-dev] Re: Strange Bug in Scripts (Python) and Python code ...

2002-10-22 Thread Evan Simpson
Joachim Werner wrote: These few lines brought the Zope server (and the Browser I used for testing) to a halt: html = '' for letter in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': html += '|'.join([html, letter]) return html This computes a string O(2^26) in length. Scripts make very little attempt to

[Zope-dev] Re: Only anonymous in an Access Rule?

2002-09-30 Thread Evan Simpson
Chris Withers wrote: How come getSecurityManager().getUser() returns the Anonymous User in access rules? Surely some checks must have been done to see whether the folder containing the access rule can be traversed to? If not, then huh? I'm confused :-( Access Rules trigger during

Re: [Zope-dev] Re: [ZPT] Order of attribute execution Feature Request

2002-05-10 Thread Evan Simpson
Jim Penny wrote: I have also said that, while ZPT is not as warty as DTML, ZPT looks, on the surface, to be pretty ugly. I have said that there are three specific things I dislike about ZPT -- 0) lots of things have changed spelling again -- request v. REQUEST, here v. context v. container

Re: [Zope-dev] Speaking of 2.6...

2002-04-17 Thread Evan Simpson
Lennart Regebro wrote: There is an alternative, and that is to clean up the enhanced enhanced virtual host monster we at Torped have done. It's based on sfm@imemes enhanced VHM and just like VHF is makes it possible to have standalone virtual hosting without strange apache magic. We

[Zope-dev] Re: typo in HTTPResponse.py

2002-03-15 Thread Evan Simpson
Christian Theune wrote: Hmm. Is it possible to implement some option to turn this off? I just checked in the ability to use HTTP_TRACEBACK_STYLE to control the appearance of tracebacks in non-debug mode errors: '' (default): Place it in an HTML comment 'none': Omit it 'plain': Include it as

Re: [Zope-dev] User Name in python script

2002-02-25 Thread Evan Simpson
Sebastian Sippl wrote: I need to get the name of the current user , in a python script In a recent Zope, you should be able to use: from AccessControl import getSecurityManager user = getSecurityManager().getUser() Cheers, Evan @ Zope ___

Re: [Zope-dev] Getting Unauthorized from __bobo_traverse__.

2001-09-12 Thread Evan Simpson
Steve Alexander wrote: ... which you can't use from restricted things like (Script) Pythons and DTML Methods. So, the answer lies in External Methods and Python Products. If only I could remember what the question was... There was a bug, fixed in 2.4.1, with restrictedTraverse across

[Zope-dev] TALES in DTML

2001-07-13 Thread Evan Simpson
I've been given time to work on draft documentation changes for: http://dev.zope.org/Wikis/DevSite/Proposals/DTMLplusTALES If you're interested, now is the time to comment. Cheers, Evan @ digicool ___ Zope-Dev maillist - [EMAIL PROTECTED]

[Zope-dev] XXXPythonScripts release 1.0

2001-07-01 Thread Evan Simpson
After seeing the demand for this in a thread on ZopeZen, I've decided to release XXXPythonScripts, at: http://www.zope.org/Members/4am/XXXPythonScripts This Product adds a new Script meta-type: Script (Python, unsafe). You can only create or edit these objects when your Zope has been started

Re: [Zope-dev] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-18 Thread Evan Simpson
Michel Pelletier wrote: Should we make an alias for bw-compatability? This is now in the trunk, along with some other compatibility changes that allow Python Methods to continue working, courtesy of the NewZopeOrg migration project. Cheers, Evan @ digicool

Re: [Zope-dev] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-15 Thread Evan Simpson
Morten W. Petersen wrote: one of my products landed flat on its face when an ImportError was raised trying to import VSEval from DocumentTemplate; is there a new class / function of some sort or simply another name for the class? See $ZOPE/lib/python/RestrictedPython. That replaces both

[Zope-dev] Re: DTML-Python confusion (RE: [Zope] How to make a script return rendered dtml)

2001-06-14 Thread Evan Simpson
Bjorn Stabell wrote: Is it possible to append an object to the namespace? Isn't that what dtml-with does? It does, but there's some magic involved (non-mapping objects have to be wrapped in an adaptor first) and it uses an interface that isn't available in a restricted code environment

[Zope-dev] Re: DTML-Python confusion (RE: [Zope] How to make a script return rendered dtml)

2001-06-13 Thread Evan Simpson
From: Bjorn Stabell [EMAIL PROTECTED] How do you do dtml-with and dtml-let in a Python script? (I.e. put something on the namespace) You can't. Scripts can use the DTML namespace in the same way that Python expressions in DTML can, but that's it. On the other hand, you can create (and pass

Re: [Zope-dev] Bug in Zope VersionControl

2001-06-08 Thread Evan Simpson
From: Martijn Pieters [EMAIL PROTECTED] REQUEST['SCRIPT_NAME'] is the root of the Zope server. In a pure ZServer environment, this is '/'. In a situation where the Zope server is running behind another webserver, and is not at the root of that server, SCRIPT_NAME represents the path to the

[Zope-dev] Re: [Zope] ANNOUNCE: Zope 2.4.0 alpha 1 released

2001-05-31 Thread Evan Simpson
- New restricted execution architecture A note about this for those who have run afoul of restrictions on builtins such as 'list', 'map', and 'range' in Scripts and DTML Python expressions: In the new architecture, there are (by default) no attempts to protect the system against excessive

Re: [Zope-dev] Re: Grrr... Python Scripts

2001-05-11 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Could that we added to PythonScripts/standard.py so I don't have to do it all the time? This is just part of a general security review that needs to happen. I suppose we need a place to collect suggestions about objects that ought to be exposed to

[Zope-dev] Re: Grrr... Python Scripts

2001-05-07 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Where should I import CatalogError from? And _please_ don't tell me I have to go through some convoluted security process to do this :-( # After adding security decls from Catalog import CatalogError Use the same security process as providing access to

Re: [Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-29 Thread Evan Simpson
From: Frank Sonnemans [EMAIL PROTECTED] This update breaks my previously working code. My site master template calls a dtml component to render a simple menu. This worked with the previous release of ZPT, but now results in a Name Error for the PARENTS[] variable. What changed in the new

[Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-27 Thread Evan Simpson
Actually, I uploaded these at 5pm today, then I had to run and catch a plane. I still haven't updated the Project wiki, but if you visit: http://www.zope.org/Members/4am/ZPT ...you can pick up the latest. You need to download all three; PageTemplates goes in a Products directory, TAL and

[Zope-dev] Two new proposals: InstallationAndConfiguration and PrefixedTagVariables

2001-04-12 Thread Evan Simpson
http://dev.zope.org/Wikis/DevSite/Proposals/InstallationAndConfiguration outlines a new process for installing and configuring Zope. http://dev.zope.org/Wikis/DevSite/Proposals/PrefixedTagVariables describes a variant of Tino's fix for sequence-item variables. Cheers, Evan @ digicool

[Zope-dev] Re: SiteAccess: virtual host monster and setServerURL issue

2001-04-10 Thread Evan Simpson
From: "Joseph Wayne Norton" [EMAIL PROTECTED] The correct virtual URL is not setup properly because the setServerURL method is always picking up the port #1080 (via oldhost,oldport) from the mod_proxy/mod_rewrite request environment even if HTTP_HOST does not contain a port number. This is

[Zope-dev] Re: SiteAccess: virtual host monster and setServerURL issue

2001-04-10 Thread Evan Simpson
From: "Joseph Wayne Norton" [EMAIL PROTECTED] The generated URLs should not have :80 in them and they do not ... rather they have :1080 included in the generated URLs although I have specifed something as follows: mod_rewrite result:

Re: [Zope-dev] Page Templates: Any plan how to use PT's for I18n and browser dependant templates etc?

2001-04-03 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] Now comes the tricky thing, case I want to render with the tal tags intact. I just tested that and they are intact after render. Jippi! This will be optional in ZPT 1.1, most likely. The next step I want to do is to save the template back to Zope and

Re: [Zope-dev] Page Templates: Any plan how to use PT's for I18n and browser dependant templates etc?

2001-04-02 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] As fas as I can see the METAL definitions are inside the template. That would mean one would some external service to route it to the correct template. For instance: use-macro="portalskins/macros/useme" portalskin in this case would return a

Re: [Zope-dev] Page Templates and nested templates

2001-04-01 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] Would it be completely stupid to be able to nest Macros. That is, you would have one MainMacroTemplate defining several Slots/SubMacros and then make several SubMacrosTemplates that inherents from the MainMacroTemplate, defining the Slots/SubMacros as

[Zope-dev] ANN: Zope Page Templates 1.0.0 beta 1

2001-03-27 Thread Evan Simpson
The first beta release of ZPT is ready! Come read about them at http://dev.zope.org/Wikis/DevSite/Projects/ZPT, and download from http://www.zope.org/Members/4am/ZPT. These should be especially interesting for teams of Zope developersin whichthe programming and page/site design tasks are

Re: [Zope-dev] call pythonscript from python

2001-03-21 Thread Evan Simpson
From: "Tim McLaughlin" [EMAIL PROTECTED] Anybody know how I can call a pythonscript from python? Currently I can call it, but I seem to have no context or security context, because it either will not let me access anything or fail with an attribute error in the context. What are the params

Re: [Zope-dev] ZPT trials and tribulations

2001-03-16 Thread Evan Simpson
From: "Phil Harris" [EMAIL PROTECTED] The problem is that I'm getting a traceback (I won't bore you with the details unless I have to) to the effect of 'ui' being unknown. Mmph. That release has a problem with exposing TAL variables to Python code. There will be a *much* better one Real Soon

Re: [Zope-dev] getPhysicalPath?

2001-03-16 Thread Evan Simpson
From: "Christian Scholz" [EMAIL PROTECTED] And can someone explain to us where the differences between aq_chain and getPhysicalPath() are? Actually getPhysicalPath() seems also to walk up aq_parent. Or am I missing something? "aq_chain" gives you a list of the objects traversed to get to your

Re: [Zope-dev] Site Access Rewrite Rule documentation?

2001-03-03 Thread Evan Simpson
From: "R. David Murray " [EMAIL PROTECTED] So, clearly I don't have a clue what stack is supposed to contain or what changing it does. Can anyone point me to docs or give me some help? You can also tell me, "that's stupid, just solve your problem this way"... You've got it almost right,

Re: [Zope-dev] REQUEST.steps

2001-02-28 Thread Evan Simpson
REQUEST has a lot of standard attributes and keys, some of which are obsolete. Deprecated attributes: o script: URL for the root object, computed from environment variables including SCRIPT_NAME. Replace with REQUEST['BASE1'] or REQUEST['BASEPATH1'] o base: URL for level above root object,

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] The Bug: If I use an name other than 'context' to bind to context, I quite often (but not always :-S) get a KeyError on that name. I'll check this out. It's in the Collector, right? The Question: If I'm calling a Python Script from a Python Product

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Cool :-) And even though I pass it in as _, it'll get bound to whatever is specified on the bindings tab, right? Nope. If you called it "fred" on the bindings tab, pass it as "fred". Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm calling a python script with the context bound to, lets say, 'fred'. I call the python script like this: result = self.aq_acquire(variable_containing_name_of_PS)(a_dictionary) ...where self is an instance of my python product, and a_dictionary, is,

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I've got an object which implements __setitem__ in such a way that it's perfectly safe for use in Python Scripts. Sadly, it seems that Evan's Byte Code hacks won't let me do this :-( The only way that the security code can know that your __setitem__ is

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] But what's so bad about type()?! When applied to an Extension Class, it gives you access to the actual class, rather than a nice inert type. Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL

Re: [Zope-dev] Virtual Host Monster Paranoia

2001-02-13 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Well, it's easy enough to find out if a site is running Zope, then this becomes pretty easy attack to think of I'm not going to claim that this is perfectly harmless, but I can't think of any way in which this could be termed an "attack". You can

Re: [Zope-dev] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Evan Simpson
From: Oliver Bleutgen [EMAIL PROTECTED] Btw. with a small module it's even possible to log the usernames with apache, something medusa isn't capabable of afaik (as of zope version 2.3). Cool! What module is this, and how do you use it? Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Problem: manage_workspace redirects to index_html

2001-02-04 Thread Evan Simpson
From: "Dylan Jay" [EMAIL PROTECTED] I'm using IE 5.01 on w2k. The current 5.01 version of IE doesn't do basic authentication correctly (or, at least, the way nearly every other version, and browser, does it). Try getting 5.5sp1 instead. Cheers, Evan @ digicool 4-am

Re: [Zope] porting from Python Methods to PythonScripts in 2.3.0; LoginManager too

2001-01-29 Thread Evan Simpson
From: "Fred Yankowski" [EMAIL PROTECTED] + Don't copy over SiteAccess and PythonMethods. + Delete the PythonMethods product from the Control_Panel/Products management folder. Will I have to manually convert each existing Python Method to a PythonScript, or are they essentially the same

Re: [Zope] porting from Python Methods to PythonScripts in 2.3.0;LoginManager too

2001-01-29 Thread Evan Simpson
From: "Jim Washington" [EMAIL PROTECTED] Standard caveats, YMMV, etc, but it does a quick pass on the Methods in the folder where it is and makes Scripts from them when you hit the 'test' tab, saving the old ones as methodname.old. Excellent! Thanks for writing and sharing this -- it looks

Re: [Zope] Python Methods can't construct literal dictionaries?

2001-01-28 Thread Evan Simpson
This is one of the shortcomings of Python Methods that Scripts eliminate. You can work around it by writing: x = {} x.update({y: z}) Cheers, Evan @ digicool 4-am ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope

Re: [Zope] PythonScript question

2001-01-27 Thread Evan Simpson
From: "Timothy Wilson" [EMAIL PROTECTED] Error Type: TypeError Error Value: argument 1: expected read-only character buffer, instance found [snip] input name="display_date:date" size="20" value=""/td [snip] D = string.split(display_date, '/') You are marshalling 'display_date' as a date, then

Re: [Zope] SiteRoot 2 errors

2001-01-26 Thread Evan Simpson
From: Stephan Goeldi [EMAIL PROTECTED] I want to add a SiteRoot to my domain subfolder. I installed a fresh Zope 2.2.5 and in the lib/python/Products folder I extracted SiteAccess-2.0.0b4-nonbin.tgz. After this I restarted Zope. When I click to Add SiteRoot, I get the following error message:

Re: [Zope] Acquisition Algebra; interaction of containment and acquisition is confusing

2001-01-26 Thread Evan Simpson
From: Fred Yankowski [EMAIL PROTECTED] for the very last case, "a.b.c.x". I just can't follow why the equivalent expression isn't x.__of__(a).__of__(c.__of__(b.__of__(a))) rather than the more complex answer given: x.__of__(a).__of__(b.__of__(a)).__of__(c.__of__(b.__of__(a))) You can

Re: [Zope] Acquisition Algebra; interaction of containment and acquisition is confusing

2001-01-26 Thread Evan Simpson
From: Fred Yankowski [EMAIL PROTECTED] Now, does that bother anyone besides me? Since acquisition is intrinsic and ubiquitous in Zope, shouldn't we be concerned that it is hard to control or predict? Keep in mind that it is only the *order after containment* that has this problem. For

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-25 Thread Evan Simpson
From: Philip Aylesworth [EMAIL PROTECTED] I would appreciate that HOWTO. :) I am going to need virtual hosting for a project I am undertaking and don't even know where to begin. Is VirtualHostMonster part of SiteAccess (which I have just discovered when I did a search on zope.org)? Do I need

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-24 Thread Evan Simpson
From: Itai Tavor [EMAIL PROTECTED] 1. When accessing http://10.0.1.21/spam PATH_INFO is /VirtualHostBase/http/10.0.1.21:80/MySite/VirtualHostRoot/spam, which breaks any method that uses PATH_INFO (For example, the login form of LoginManager). Can this be fixed somehow? The Zope virtual

Re: [Zope] Add this to Wish list

2001-01-24 Thread Evan Simpson
From: Jerome Alet [EMAIL PROTECTED] Please could you include a button "Download Source" to the Python Script edition form ? Already done; There's a link in the paragraph below the text area, and above the upload form (in CVS). Cheers, Evan @ digicool 4-am

Re: [Zope] Did I miss some major change in Z SQL Methods ?

2001-01-24 Thread Evan Simpson
From: "Curtis Maloney" [EMAIL PROTECTED] A Z SQL Method ( Returner.sql.getDetails ) [snip] dtml-with "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-with You want either: dtml-in "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-in ...or... dtml-with

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-24 Thread Evan Simpson
From: "Itai Tavor" [EMAIL PROTECTED] Great, thanks for the fix. It's fine in Zope 2.3b3. I should probably write a Howto for VirtualHostMonster, and ask the folks who've written the various fine SiteAccess-related Howtos to incorporate it. It really is a lot easier and safer to use than

  1   2   3   >