Patch for nevow to work on Windows

Werner Thie <[email protected]> Thu, 15 Nov 2007 11:49:03 +0100
Newsgroups gmane.comp.python.quotient.dev
Message-ID <[email protected]>
Hi all

Anybody outhere who opposes a patch to testutil.py?

Index: C:/proj/nevow/Nevow/nevow/testutil.py
===================================================================
--- C:/proj/nevow/Nevow/nevow/testutil.py	(revision 14250)
+++ C:/proj/nevow/Nevow/nevow/testutil.py	(working copy)
@@ -2,8 +2,9 @@
  # See LICENSE for details.

  import sys, signal
-from popen2 import Popen3
-from os import WEXITSTATUS, WIFSIGNALED, WTERMSIG
+if sys.platform != "win32":
+    from popen2 import Popen3
+    from os import WEXITSTATUS, WIFSIGNALED, WTERMSIG

  from zope.interface import implements

As I already pointed out before, MSW Python does not have Popen3. 
Because of testutil.py being imported somewhere in the guts of nevow 
this was the easiest fix for me to make it work on MSW. It disables of 
course testing, but I'am developing on MSW with SPE and WinPdb, which 
works like a charm and deploying to OpenBSD.

Thxs, Werner