[GRASS-user] "Force" print at a special position in python script

Hello,

I am using python for a script and at some places in the script
I placed the print command like 'print "TEST"'.
The problem is that the all the single steps in the script are executed before the variable is printed, meaning the result of print shown last and not at the place where I placed it in the script.

Is that normal and how can I force that I get the output a the place where
the print command is?

thank you
Johannes
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

Johannes wrote:

I am using python for a script and at some places in the
script
I placed the print command like 'print "TEST"'.
The problem is that the all the single steps in the script
are executed before the variable is printed, meaning the
result of print shown last and not at the place where I
placed it in the script.

Is that normal and how can I force that I get the output a
the place where the print command is?

see http://stackoverflow.com/questions/230751/how-to-flush-output-of-python-print

Hamish