Index: twisted/python/reflect.py
===================================================================
--- twisted/python/reflect.py	(revision 24685)
+++ twisted/python/reflect.py	(working copy)
@@ -288,7 +288,10 @@
 
 def qual(clazz):
     """Return full import path of a class."""
-    return clazz.__module__ + '.' + clazz.__name__
+    if hasattr(clazz, '__module__'):
+        return clazz.__module__ + '.' + clazz.__name__
+    else:
+        return clazz.__name__
 
 def getcurrent(clazz):
     assert type(clazz) == types.ClassType, 'must be a class...'
Index: twisted/python/lockfile.py
===================================================================
--- twisted/python/lockfile.py	(revision 24685)
+++ twisted/python/lockfile.py	(working copy)
@@ -24,9 +24,9 @@
     from os import remove as rmlink
     _windows = False
 except:
+    import traceback
+    traceback.print_exc()
     _windows = True
-    from win32api import OpenProcess
-    import pywintypes
 
     ERROR_ACCESS_DENIED = 5
     ERROR_INVALID_PARAMETER = 87
@@ -34,6 +34,8 @@
     _open = file
 
     def kill(pid, signal):
+        import pywintypes
+        from win32api import OpenProcess
         try:
             OpenProcess(0, 0, pid)
         except pywintypes.error, e:
Index: twisted/python/win32.py
===================================================================
--- twisted/python/win32.py	(revision 24685)
+++ twisted/python/win32.py	(working copy)
@@ -31,7 +31,7 @@
     """
     return getattr(exceptions, 'WindowsError', FakeWindowsError)
 
-class FakeWindowsError(OSError):
+class FakeWindowsError(Exception):
     """
     Stand-in for sometimes-builtin exception on platforms for which it
     is missing.
Index: twisted/application/app.py
===================================================================
--- twisted/application/app.py	(revision 24685)
+++ twisted/application/app.py	(working copy)
@@ -2,7 +2,7 @@
 # Copyright (c) 2001-2008 Twisted Matrix Laboratories.
 # See LICENSE for details.
 
-import sys, os, pdb, getpass, traceback, signal, warnings
+import sys, os, pdb, getpass, traceback, warnings
 
 from twisted.python import runtime, log, usage, failure, util, logfile
 from twisted.python.versions import Version
