[Zope-dev] PythonWin/Textpad, external import of Zope module and Persistence

Chris Withers chrisw@nipltd.com
Thu, 15 Aug 2002 10:54:27 +0100


Johan Carlsson [Torped] wrote:
> 
> I'm trying to setup to run with either TextPad, which can run external 
> program like python scripts
> and then parse the result and making Traceback lines linked to the 
> line/file where the error occurred.

No sure exactly what you're trying to do here, can you privde more detail?

> Or try using Python which has an build in debugger which I like to be 
> able to use.
> 
> The first problem I encounter in both scenarios is that when a file 
> "import Globals"
> which in its turn "from Persistence import Persistent", this fails.
> Mostly because Persistence is "hot patched" by ZODB.
> Is there any smart way to setup a "virtual Zope" environment without 
> importing Zope
> (which mounts the Data.fs) or by importing Zope by in a light way 
> without mounting
> a storage or just mounting a lights storage.

'import Zope' is the only sane thing I can think you'd want to do. Zope has lots 
of magic that happens when you do that, and unless you do that, things won't 
behave as you expect.

You will need to mount the ZODB, but if you use ZEO then this isn't a problem as 
your webserver can mount the same storage.

cheers,

Chris