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

Jamie Heilman jamie at audible.transient.net
Tue Feb 3 15:26:45 EST 2004


Evan Simpson wrote:
> Argh.  Scripts need a __name__ defined, or various activities choke.  It 
> can't be the Id of the Script, since that can contain '.', which screws 
> up imports in the Script.  It can't be None, since that will cause this 
> problem.
> 
> Are there hidden gotchas lurking around giving all Scripts the __name__ 
> "Script (Python)"?  Other suggestions?

Ages ago I suggested "__main__" because the newly instantiated code is
sort-of a new top-level namespace for a sort-of python interpreter.
But given all the issues that arrised with the other choices maybe
there's lurking gotchas with "__main__" too.  Anyway, thats my
thought.

-- 
Jamie Heilman                     http://audible.transient.net/~jamie/
"Paranoia is a disease unto itself, and may I add, the person standing
 next to you may not be who they appear to be, so take precaution."
						-Sathington Willoughby



More information about the Zope-Dev mailing list