Hello GRASS users,
i think it should be possible to color the output of certain print-commands
of a python script, but I don't know how.
It'd be nice e.g if a command like 'print "Script processed succesfully"' is printed in green in the stdout of the GRASS command console.
Does anyone know how this can be easily achieved in a python script?
/johannes
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
Hi,
2011/4/27 Johannes Radinger <JRadinger@gmx.at>:
It'd be nice e.g if a command like 'print "Script processed succesfully"' is printed in green in the stdout of the GRASS command console.
do you mean terminal or wxGUI command output?
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
-------- Original-Nachricht --------
Datum: Wed, 27 Apr 2011 11:01:56 +0200
Von: Martin Landa <landa.martin@gmail.com>
An: Johannes Radinger <JRadinger@gmx.at>
CC: grass-user@lists.osgeo.org
Betreff: Re: [GRASS-user] color for stdout print output
Hi,
2011/4/27 Johannes Radinger <JRadinger@gmx.at>:
> It'd be nice e.g if a command like 'print "Script processed
succesfully"' is printed in green in the stdout of the GRASS command console.
do you mean terminal or wxGUI command output?
In my case I am starting my script in the GRASS in the command console,
so the output is in the GUI command output.
Johannes
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
Hej,
does anyone know how to color the print-output in the
wxGUI command output? What is the right command in python?
I tried print '\033[1;32mGreen like Grass\033[1;m' but
that isn't working (http://www.siafoo.net/snippet/88).
/Johannes
-------- Original-Nachricht --------
Datum: Wed, 27 Apr 2011 11:01:56 +0200
Von: Martin Landa <landa.martin@gmail.com>
An: Johannes Radinger <JRadinger@gmx.at>
CC: grass-user@lists.osgeo.org
Betreff: Re: [GRASS-user] color for stdout print output
Hi,
2011/4/27 Johannes Radinger <JRadinger@gmx.at>:
> It'd be nice e.g if a command like 'print "Script processed
succesfully"' is printed in green in the stdout of the GRASS command console.
do you mean terminal or wxGUI command output?
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone