Re: [Zope-dev] Re: ZCatalog and Unique IDs

2000-05-25 Thread Evan Simpson
- Original Message - From: Chris Withers [EMAIL PROTECTED] who's the CTO? Jim Fulton, Chief Technology Officer. use paths instead of object monikers. Why not do both? Have an POID (CORBA style) to actually identify an object and then use paths of POIDS to identify stuff in a

Re: [Zope-dev] Problems with LoginManager form-based login

2000-05-26 Thread Evan Simpson
- Original Message - From: Phillip J. Eby [EMAIL PROTECTED] Been there, done that. Yours doesn't work either, btw. Well, actually, it does, it's just that it causes a memory leak because it leaves an unintended circular reference. We've got a version that fixes the circular

Re: [Zope-dev] Problems with LoginManager form-based login

2000-05-26 Thread Evan Simpson
- Original Message - From: Phillip J. Eby [EMAIL PROTECTED] The GUF version, at least, doesn't need this drastic a fix. Adding the following line to the top of guf_unauthorized should suffice: del request.RESPONSE.unauthorized You're making the assumption that unauthorized gets

Re: [Zope-dev] Traversal Stuff

2000-05-31 Thread Evan Simpson
- Original Message - From: Chris Withers [EMAIL PROTECTED] What this offers is having a URL like: http://mysite.com/folder/object/some/parameters processed by the 'object' object with a parameter of '/some/parameters' or better still a 'URL objects' list as a parameter. This sounds

Re: [Zope-dev] Problems with LoginManager form-based login

2000-06-02 Thread Evan Simpson
- Original Message - From: Phillip J. Eby [EMAIL PROTECTED] At 06:14 PM 5/26/00 -0400, Evan Simpson wrote: D'oh! How 'bout if REQUEST.close() were to always do a self.__dict__.clear()? Are you absolutely positively sure that REQUEST.response is never accessed following

Re: [Zope-dev] Import from upload?

2000-06-05 Thread Evan Simpson
- Original Message - From: Toby Dickenson [EMAIL PROTECTED] I dont think that's going to fly. It's perfectly ok for a persistant object to contain something that shouldn't be creatable. True enough. Further thought has made me realize that a persistent object could contain only valid

Re: [Zope-dev] No feedback for SOAP patch ?

2000-06-23 Thread Evan Simpson
- Original Message - From: "Petru Paler" [EMAIL PROTECTED] I received zero feedback on the SOAP support patch I sent a few days ago... I no one is interested I guess I should just forget about it and find something else more interesting ? I've barely had a free second with

Re: [Zope-dev] SiteAccess in 2.0.0b2?

2000-06-23 Thread Evan Simpson
- Original Message - From: T.J. Mannos [EMAIL PROTECTED] I'm having trouble getting SiteAccess 2.0.0b2 to work with Zope 2.2.0b2. The first odd thing that happens is when I create a new SiteRoot, it says that this object already has a SiteRoot (which it doesn't), but creates it

[Zope-dev] Re: The new SiteAccess and __no_before_traverse__?

2000-06-25 Thread Evan Simpson
- Original Message - From: "Christian Scholz" [EMAIL PROTECTED] I am playing around with SiteAccess and Zope 2.2b1 right now and I wonder if it's still possible to disable SiteAccess (actually an AccessRule) by using __no_before_traverse__? It seems not to and I am a bit trapped right

Re: [Zope-dev] NASTY error. Why?

2000-07-10 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Error Type: TypeError Error Value: read-only character buffer, Python Method Looks like the 'id' of something along the line is a method rather than a string. Try "_.getitem('id', 1)". Cheers,

Re: [Zope-dev] getting request variables values

2000-07-20 Thread Evan Simpson
The value you're after is stored in the 'environ' section of the request. Unlike 'other' and 'cookies' keys, 'environ' keys can't generally be fetched as attributes or keys of REQUEST. You need to access them as REQUEST.environ['keyname']. Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Acquisition Confusion :S

2000-08-01 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I still don't get this :( Here are the two and a half rules for deriving acquisition from a dotted expression: 1. A.B == (B o A), where A is an unwrapped object 2. (self o parent).B == a. (self.B o (self o parent)), if B is found in 'self' b.

Re: [Zope-dev] Acquisition Confusion :S

2000-08-08 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Who would be best to ask why it was set up the way it is? I'm sure there are very good reasons for it but the search order in all but the simple cases is very confusing and not as useful as it could be. How much more work would it be to implement the

Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] - never expose a "bare" object, or even one with an incomplete context Why? You can get at it through aq_base anyway, surely? Only from unrestricted code. DTML and (CVS) Python Methods only let you access aq_parent. This only applies to objects that

[Zope-dev] Re: Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Ah, okay... so really, prettymuch all Zope objects should be wrapped with only one or two exceptions, most of which aren't actually objects as such but simple data types? Yes. Also, there is a very limited range of "natural" ways to construct the

Re: [Zope-dev] Still no safe seperators :P

2000-08-17 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Looks like the colon it is then, there's even a patch now ;-) There a patch sitting around waiting for DTML syntaxgeddon which allows slash-separated paths in object names everywhere, not just in entity syntax. That could easily be extended to also allow

[Zope-dev] Re: /, XML, DTML syntaxgeddon

2000-08-18 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I suggested the / thing to Steve who pointed out that dtml-/folder/object; is bad XML/SGML and so 'Not a Good thing (tm)' Yes, well, making DTML compatible with XML is explicitly *not* a current goal, although having ':' as an alternative separator should

[Zope-dev] Re: Virtual Hosting in 2.2 - a Bestiary of Buglets

2000-09-05 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] Problem 1: HTTP and HTTPS (more of a proxypass issue) === I want to be able to serve both http and https versions of a site from Apache. Problem is, because of the way proxying works, there is

[Zope-dev] Re: SiteAccess 2 Questions

2000-09-05 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] It looks like REQUEST.steps is the replacement for PARENTS? Is that so? Actually, REQUEST.steps has always been there -- it's the list of *ids* that were traversed. This may or may not correspond to the ids of the PARENTS, depending on whether an object

Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-09 Thread Evan Simpson
From: "Steve Alexander" [EMAIL PROTECTED] obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED) This stopped working when I tried the software on Windows. Bug or feature? I'm not sure, but I'm *very* curious what you're trying to accomplish with this code. A better equivalent would

Re: [Zope-dev] is INSTANCE_HOME broken on Win32?

2000-09-11 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm trying to make Squishdot work with INSTANCE_HOME nicely. However, the testing is going wrong on a normal Win32 Install... I had lots of lines that went something like: f=open('%s/Products/%s.dtml' % (SOFTWARE_HOME,file)) Which generates:

Re: [Zope-dev] HiperDOM xmlc

2000-09-18 Thread Evan Simpson
From: Phillip J. Eby [EMAIL PROTECTED] [snip description] The effective external behavior of these two attributes, would be to let a web designer load and save any page or template they wished in the site, freely making changes to the header, footer, or various embedded elements thereof, and

Re: [Zope-dev] Adding functions to _

2000-09-18 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] However, when I call the function, I get an error about DocumentTemplate, from which I discovered that when I call _.logvis('a_string'), instead of the string being passed as the first parameter, _ is passed as the first parameter to my function,

[Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: "Jim Fulton" [EMAIL PROTECTED] We are going to provide an alternate interface, so that if an object has a special method, then this will be called instead. okay... which proposal/project is this in? I don't remember. Evan? PythonMethods, essentially, unless you'd really like me

Re: [Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Evan Simpson wrote: PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. No, not at all, just where I can find some docs for this specific bit would be more than sufficient

Re: [Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Evan Simpson
From: Stephen Simmons [EMAIL PROTECTED] 1.) How do you magically get the DTML context from 'dtml-var A' without having to resort to 'dtml-var "A(_,REQUEST)"' in the templates? A.isDocTemp = 1 # or make it a shared class attribute 2.) How to convert an arbitrary text string into rendered

[Zope-dev] SiteAccess + ZCatalog Project

2000-11-07 Thread Evan Simpson
Those of you who use SiteAccess, or any other virtual hosting solution, with ZCatalog (including Squishdot, ZUBB, and other ZCatalog-dependent products) should check out this new project: http://dev.zope.org/Wikis/DevSite/Projects/ZCatalogVirtualHostFix This proposes a set of changes and an

Re: [Zope-dev] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] Using context.this().id, self.this().id, m_self.this().id all get me the same things: Folder, Zope, and my method. None give me the DTML Document foo_html. This would seem to be an important thing. The only information about your caller that you can

[Zope-dev] Re: [Zope] IE5 / Medusa bug?

2000-12-14 Thread Evan Simpson
From: seb bacon [EMAIL PROTECTED] I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) Leaving off index_html causes Zope to add a base href to the head. That's the only difference I can think of. Your page doesn't get

Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-15 Thread Evan Simpson
From: Itai Tavor [EMAIL PROTECTED] In Python Methods I could do urllib.quote(...). This doesn't work in Python Scripts. Is quote considered a security risk? No, but only the modules available to DTML are importable by default. You would need to provide security declarations in order to

Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-17 Thread Evan Simpson
From: "Itai Tavor" [EMAIL PROTECTED] import urllib urllib.__allow_access_to_unprotected_subobjects__ = 1 Ok, this is simple enough, and it works. But... it opens access to everything in urllib. For now, the best way is to use a dictionary of names, like this: import urllib

Re: [Zope-dev] Changing hostname and port without SiteAccess

2000-12-18 Thread Evan Simpson
From: Martin Winkler [EMAIL PROTECTED] I cannot use SiteAccess (because I need multiple ZCatalogs) To the extent that you can't use SiteAccess with ZCatalogs, you will also not be able to use any other solution (until ZCatalogs are fixed, hopefully in 2.3). The problem with ZCatalogs is not

[Zope-dev] Product Authors: If you use ZCatalog, READ! (that means you, Chris W. :-)

2000-12-18 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] I would happy to, it looks like it does what I need (having siteaccess). However, I don't see a clear cut description what's changing and how. What needs to be done (in easy to understand language) to make sure it all goes smooth, etc. It's one step

Re: [Zope-dev] Import with INSTANCE_HOME?

2001-01-03 Thread Evan Simpson
From: BS [EMAIL PROTECTED] Can anyone tell me how to do a "from Products.ZPatterns import anything" when using INSTANCE_HOME? Do I have to add the INSTANCE_HOME path to sys.path? As long as Python has already imported Zope (i.e. you're in another Product) you don't need to do anything

[Zope-dev] Re: [Zope] Lobbying (was: [Zope] html_quote in python methods?)

2001-01-04 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Only if you add security declarations to expose functionality from xmlrpclib. Is that hacky and nasty? :-S In Zope 2.3, you place the following code somewhere that it will get executed at startup (a custom Product's __init__ is the best bet): from

[Zope-dev] Python Scripts update

2001-01-04 Thread Evan Simpson
Python Scripts have gone through a fair number of changes and bugfixes recently. They should now work properly as methods of ZClasses. When you download the source of a Python Script, the title, parameter list, and bindings are added to the source in the form of specially formatted comments.

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

[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] 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

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

[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:

[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] 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

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] 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] 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: [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] 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: 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] 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

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

[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] 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

[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]

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

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 ___

[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] 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

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

[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

[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: 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] 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

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 -

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 -

[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

[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: 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: 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: 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: 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: 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-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-30 Thread Evan Simpson
Jim Penny wrote: And why would I expect a ZPT person to have a basic knowledge of data structures? In my view, this whole idea is primarily aimed at programmers. I fully expect that non-programmer ZPT people will be able to ignore this stuff, apart from being handed a small set of idioms by the

[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] 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: PythonLibraries Product

2003-09-10 Thread Evan Simpson
Seb Bacon wrote: So AFAICT it's a convenience which allows you (a) to keep related functions together; and (b) to store local variables in a convenient place. It definitely sounds useful but also a lot of work for something it's possible to manage without quite easily at the moment..? Could

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

  1   2   >