Stephan Richter wrote:
> Hi Jim and other zc.zope3recipes experts,
> I have had some reports from Windows users that the z3c.formdemo -- which is 
> built with zc.zope3recipes -- is not working on Windows. The reported error 
> was as follows:
> E:\formdemo>.\bin\demo fg
> Traceback (most recent call last):
>   File "E:\formdemo\bin\demo-script.py", line 14, in ?
>     zc.zope3recipes.ctl.main([
>   File 
> "e:\formdemo\eggs\zc.zope3recipes-0.5.1-py2.4.egg\zc\zope3recipes\ctl.py", 
> line 47, in main
>     zdaemon.zdctl.main(args, None, Cmd)
>   File 
> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py", 
> line 626, in main
>   File 
> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py", 
> line 125, in __init__
>   File 
> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py", 
> line 185, in get_status
>   File 
> "e:\formdemo\eggs\tmp9ghl8n\zdaemon-2.0a6-py2.4.egg\zdaemon\zdctl.py", 
> line 165, in send_action
> AttributeError: 'module' object has no attribute 'AF_UNIX'
> Is there any chance we can fix that?

I'm not sure if there is a general solution for this problem, as this
would involve making zdaemon aware of and run on Windows, which isn't a
target platform for this particular package for what I witness.

If you want to look for a non-general solution, you can take a look at
the zopectl implementation of Zope2 on the trunk
which I made Windows compatible by adding a bit of platform specific code.

I'm sure this can be easily ported to the ctl.py class in zope3recipes
or the zopectl implementation of Zope3.

One of the most basic things you need to do, is to provide a
'get_status' method which doesn't call send_action on Windows...
effectively disabling the checks for a running daemon manager. I
replaced the daemon manager support with support for starting and
stopping a Windows service instead which can also be easily installed
via ./bin/zopectl install


Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to