How do you use PythonNET in a Zope Environment?
![](https://secure.gravatar.com/avatar/72ac8ee59f2c1eadf17301925679bcdf.jpg?s=120&d=mm&r=g)
How does one use PythonNET in a Zope Environment to access .NET libraries... 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.
![](https://secure.gravatar.com/avatar/5462e710e6931162784950ecae16f77d.jpg?s=120&d=mm&r=g)
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. HTH, Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
participants (2)
-
Andy Shah
-
Brian Lloyd