util/ProcessLogger.py
branchpython3
changeset 3755 ca814b175391
parent 3750 f62625418bff
child 3786 50935528d313
equal deleted inserted replaced
3754:98a76dbb1b6d 3755:ca814b175391
    19 # GNU General Public License for more details.
    19 # GNU General Public License for more details.
    20 #
    20 #
    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 
       
    25 
    24 
    26 
    25 
    27 import os
    26 import os
    28 import sys
    27 import sys
    29 import subprocess
    28 import subprocess
   140             self.timeout = None
   139             self.timeout = None
   141 
   140 
   142         if _debug and self.logger:
   141         if _debug and self.logger:
   143             self.logger.write("(DEBUG) launching:\n" + self.Command_str + "\n")
   142             self.logger.write("(DEBUG) launching:\n" + self.Command_str + "\n")
   144 
   143 
   145         self.Proc = subprocess.Popen(self.Command, **popenargs)
   144         self.Proc = subprocess.Popen(self.Command, encoding="utf-8", **popenargs)
   146 
   145 
   147         self.outt = outputThread(
   146         self.outt = outputThread(
   148             self.Proc,
   147             self.Proc,
   149             self.Proc.stdout,
   148             self.Proc.stdout,
   150             self.output,
   149             self.output,