Hi Jurko,

Thanks a lot for the test-case - I should have provided one myself ...

   Could you please post a small reproducible test case? I'll try to reproduce it right now but many variants & questions pop to mind (e.g. does the batch file output to stdout or stderr or does the batch file contain the @echo off line, etc...).

It has echo off:

@echo off

setlocal enableextensions enabledelayedexpansion
set THISDIR=%~dp0

echo start loop

for %%I in ( %THISDIR%src\*.txt ) do ( 
    rem %%~nxI  is equivalent to `basename "${I}"` . see "FOR /?"
    echo converting %%I
    echo         to %%~nxI
    iconv -f iso-8859-1 -t utf-8 %%I > %%~nxI

echo end loop

And the python bit I changed to

# import os
# os.system( "worker.bat" )

import subprocess
command = ["worker.bat"]
  Unfortunately I have not been able to reproduce the behaviour you describe. I'm attaching my test case that seems to work as expected.

Same here, I changed to following to mimick my situation better
- use of subprocess (so Python can mess up stdin/out)
- a small loop in the .bat file

  Just unpack it into an empty folder, set the %PYTHON% environment variable to point to your python interpreter (e.g. set PYTHON="C:\Program Files\Python25\python.exe") and run bjam in that folder. You should get an out.txt file containing the work 'testing' and no 'echo' command used to produce that text.

I tried - I cannot reproduce my claim (yet)

I will try harder; as I had the situation in our build: with bjam 3.1.14 all went smoothly, with bjam 3.1.16 the builds went down because somehow output was redirected to the wrong file ..

It might be in the python bit, as popen does its own magic with stdin/out/err
  Hope this helps.

It does!
  Best regards,
    Jurko Gospodnetić


_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

+31 6 411 92 024