[Zope-dev] Possible Windows Service improvements.

Tim Peters tim.peters at gmail.com
Thu Aug 5 01:56:55 EDT 2004


Some quick hit-and-runs.

[Mark Hammond]
>> FWIW, the way to do that better was to use WaitForSingleObject(hStopEvent,
>> timeout_period*1000).

[Cris McDonough]
> Is this a more-or-less direct replacement for the usage of time.sleep()
> in the current incarnation of SvcDoRun?

The Windows WaitFor{Single,Multiple}Object calls are mondo cool. 
Think "select()" under Unix, but generalized to all sorts of things. 
The call above waits for hStopEvent to "be signaled", but for no
longer than the timeout period.  The return value tells you whether
you timed out or got the signal you were waiting for.  Ironically,
while the WaitFor... calls work with events, mutexes, processes, etc,
etc, they *don't* work with sockets.  Heh.

...
> It actually impossible to *stop* Zope from using pieces of another
> system-installed Python, given that it apparently looks unconditionally
> to the registry to find some things.
> (See the thread revolving around
> http://mail.zope.org/pipermail/zope-dev/2004-March/021979.html for the
> details).  This is actually not a desirable feature.

Mark knows about that, and it's fixed in current win32all.  But
current win32all builds are shipped as disutils-produced Windows
installers, not as Wise installers, so none of our Windows-buildout
scripts know what to do with a current release.

Given what little (albeit crucial) use Zope makes of win32all, it
might be wise for Zope to repackage a much smaller part of it.

> ...
> FWIW, Tim (most recently), I (second-most-recently), and Brian Lloyd
> (least recently) are really the only people who have put a concerted
> effort into keeping Zope running and installable acceptably under
> Windows.

Actually not!  I've never built the Zope Windows installer, and the
process in fact never ran to completion on Win98SE.  I do build the
Zope Z4I and ZRS Windows installers, and they've gotten a lot more
recent attention.  Z4I requires that Zope was already installed, and
ZRS is independent of Zope.  They're quite different from the Zope
Windows installers in some respects (for example, they ship files with
Windows line endings <wink>), but I haven't had time to fold those
improvements back into the Zope installer.

> ...
> Tim has an excuse (he still works for ZC, which apparently does have
> customers that use Windows as a server platform and he uses Windows
> himself), but I think everyone would agree that he really should be working on
> more important things.

Rob doesn't agree, when a paying customer is waiting for a Windows ZRS
installer.  I don't blame him.  Despite that I really, really want to
<wink>.

> Brian has long ago disavowed any knowledge of making Zope run under
> Windows.  So in other words, it's probably a very good thing you're here! ;-)

I've known Mark for a decade, and it's generally a very good thing
when he's anywhere near.  The trick for us (and it's a very small
trick) is to convince him that the Windows Zope user experience is
poor.  He won't be able to refrain from fixing it then, and even if
it's entirely Windows's fault!  You should see what he did with the
SpamBayes Outlook client ...


More information about the Zope-Dev mailing list