[Python.NET] How do you use PythonNET in a Zope Environment?

Brian Lloyd brian at zope.com
Mon Apr 19 13:43:06 EDT 2004

> How does one use PythonNET in a Zope Environment to access .NET 
> libraries...

It is mostly an issue of making sure that the CLR modules are 
on the python path. I'm assuming you're using a windows build 
of Zope - if so, you should be able to put CLR.dll in the 
bin/DLLs directory of the Zope install. Python.Runtime.dll will 
need to either be in the GAC or in the 'application directory' 
(working directory of the process, which should either be the 
root of the Zope install or root/bin - sorry I don't recall 
which one exactly).

> Can we also use pre-created .NET libraries, which inturn access 
> database servers, the results of which can be shown via ZPT?
> Kind Regards,
> Anand.

Should be no problem. Note that you *will* have a problem if you 
try to access any STA threaded COM components (directly or indirectly), 
as they won't play nice with the Zope threads. That's not to say that 
it can't be done, but you'd need to manage threading issues explicitly, 
which is different than the normal Zope rythym of not having to worry 
about threads and just writing code as if its single-threaded.


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716              
Zope Corporation   http://www.zope.com 

More information about the PythonDotNet mailing list