very dubious but observed : os.system works on linux, subprocess.call on windows, no other way around ? 3.5
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 09 Sep 2009 19:06:35 +0200
branch3.5
changeset 3156 cd56d5c379cb
parent 3155 14e30e2520d7
child 3162 d6ae24439bee
very dubious but observed : os.system works on linux, subprocess.call on windows, no other way around ?
common/i18n.py
--- a/common/i18n.py	Wed Sep 09 18:38:25 2009 +0200
+++ b/common/i18n.py	Wed Sep 09 19:06:35 2009 +0200
@@ -9,6 +9,7 @@
 
 import re
 import os
+import sys
 from os.path import join, basename, splitext, exists
 from glob import glob
 
@@ -44,7 +45,10 @@
     status != 0
     """
     print cmd.replace(os.getcwd() + os.sep, '')
-    from subprocess import call
+    if sys.platform == 'win32':
+        from subprocess import call
+    else:
+        call = os.system
     status = call(cmd)
     if status != 0:
         raise Exception('status = %s' % status)