[Checkins] SVN: z3c.recipe.winservice/trunk/ - kill off pythonw.exe - it just causes problems when something is written to stdout

Adam Groszer agroszer at gmail.com
Tue May 12 10:35:40 EDT 2009


Log message for revision 99872:
  - kill off pythonw.exe - it just causes problems when something is written to stdout

Changed:
  U   z3c.recipe.winservice/trunk/CHANGES.txt
  U   z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt
  U   z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in

-=-
Modified: z3c.recipe.winservice/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.winservice/trunk/CHANGES.txt	2009-05-12 12:28:21 UTC (rev 99871)
+++ z3c.recipe.winservice/trunk/CHANGES.txt	2009-05-12 14:35:40 UTC (rev 99872)
@@ -5,6 +5,9 @@
 Version 0.7.0 (unreleased)
 --------------------------
 
+- kill off pythonw.exe - it just causes problems when something is
+  written to stdout
+
 - Use python.exe in debug mode -- it will display/log exceptions
 
 

Modified: z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt
===================================================================
--- z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt	2009-05-12 12:28:21 UTC (rev 99871)
+++ z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/README.txt	2009-05-12 14:35:40 UTC (rev 99872)
@@ -188,7 +188,6 @@
   # these are replacements from winservice recipe
   PYTHON = r'U:\Python24\python.exe'
   PYTHONDIR = os.path.split(PYTHON)[0]
-  PYTHONW = os.path.join(PYTHONDIR, 'pythonw.exe')
   PYTHONSERVICE_EXE = r'%s\Lib\site-packages\win32\pythonservice.exe' % PYTHONDIR
   TOSTART = r'/sample-buildout/bin/app-script.py'
   SERVICE_NAME = '...sample_buildout_bin_app_script_py'
@@ -253,21 +252,12 @@
       start_cmd = ''
   <BLANKLINE>
       def __init__(self, args):
-          if TOSTART.endswith('-servicedebug.py'):
-              #we're better off with python.exe
-              python = PYTHON
-          else:
-              python = PYTHONW
-          if not os.path.exists(python):
-              #virtualenv misses pythonw.exe, fall back to python.exe
-              python = PYTHON
-              if not os.path.exists(python):
-                  raise OSError("%s or %s does not exist" % (PYTHONW, PYTHON))
-  <BLANKLINE>
+          if not os.path.exists(PYTHON):
+              raise OSError("%s does not exist" % PYTHON)
           if not os.path.exists(TOSTART):
               raise OSError("%s does not exist" % TOSTART)
   <BLANKLINE>
-          self.start_cmd = '"%s" "%s"' % (python, TOSTART)
+          self.start_cmd = '"%s" "%s"' % (PYTHON, TOSTART)
   <BLANKLINE>
           win32serviceutil.ServiceFramework.__init__(self, args)
           # Create an event which we will use to wait on.

Modified: z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in
===================================================================
--- z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in	2009-05-12 12:28:21 UTC (rev 99871)
+++ z3c.recipe.winservice/trunk/src/z3c/recipe/winservice/winservice.in	2009-05-12 14:35:40 UTC (rev 99872)
@@ -87,7 +87,6 @@
 # these are replacements from winservice recipe
 PYTHON = r'<<PYTHON>>'
 PYTHONDIR = os.path.split(PYTHON)[0]
-PYTHONW = os.path.join(PYTHONDIR, 'pythonw.exe')
 PYTHONSERVICE_EXE = r'%s\Lib\site-packages\win32\pythonservice.exe' % PYTHONDIR
 TOSTART = r'<<RUNZOPE>>'
 SERVICE_NAME = '<<SERVICE_NAME>>'
@@ -152,21 +151,12 @@
     start_cmd = ''
 
     def __init__(self, args):
-        if TOSTART.endswith('-servicedebug.py'):
-            #we're better off with python.exe
-            python = PYTHON
-        else:
-            python = PYTHONW
-        if not os.path.exists(python):
-            #virtualenv misses pythonw.exe, fall back to python.exe
-            python = PYTHON
-            if not os.path.exists(python):
-                raise OSError("%s or %s does not exist" % (PYTHONW, PYTHON))
-
+        if not os.path.exists(PYTHON):
+            raise OSError("%s does not exist" % PYTHON)
         if not os.path.exists(TOSTART):
             raise OSError("%s does not exist" % TOSTART)
 
-        self.start_cmd = '"%s" "%s"' % (python, TOSTART)
+        self.start_cmd = '"%s" "%s"' % (PYTHON, TOSTART)
 
         win32serviceutil.ServiceFramework.__init__(self, args)
         # Create an event which we will use to wait on.



More information about the Checkins mailing list