util/ProcessLogger.py
branchpython3
changeset 3750 f62625418bff
parent 3722 ffce28009ad3
child 3755 ca814b175391
equal deleted inserted replaced
3749:fda6c1a37662 3750:f62625418bff
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    24 
    24 
    25 
    25 
    26 from __future__ import absolute_import
    26 
    27 import os
    27 import os
    28 import sys
    28 import sys
    29 import subprocess
    29 import subprocess
    30 import ctypes
    30 import ctypes
    31 import time
    31 import time
    98         fsencoding = sys.getfilesystemencoding()
    98         fsencoding = sys.getfilesystemencoding()
    99         self.output_encoding = output_encoding
    99         self.output_encoding = output_encoding
   100 
   100 
   101         if encoding is None:
   101         if encoding is None:
   102             encoding = fsencoding
   102             encoding = fsencoding
   103         self.Command = [self.Command[0].encode(fsencoding)]+map(
   103         self.Command = [self.Command[0].encode(fsencoding)]+[x.encode(encoding) for x in self.Command[1:]]
   104             lambda x: x.encode(encoding), self.Command[1:])
       
   105 
   104 
   106         self.finish_callback = finish_callback
   105         self.finish_callback = finish_callback
   107         self.no_stdout = no_stdout
   106         self.no_stdout = no_stdout
   108         self.no_stderr = no_stderr
   107         self.no_stderr = no_stderr
   109         self.startupinfo = None
   108         self.startupinfo = None