[Qgis-developer] Debugging Plug-Ins in Windows

Anita Graser anitagraser at gmx.at
Mon May 5 10:49:34 EDT 2008


Thank you! You saved my day.



-------- Original-Nachricht --------
> Datum: Mon, 5 May 2008 16:39:00 +0200
> Von: "Martin Dobias" <wonder.sk at gmail.com>
> An: "Anita Graser" <anitagraser at gmx.at>
> CC: qgis-developer at lists.osgeo.org
> Betreff: Re: [Qgis-developer] Debugging Plug-Ins in Windows

> On Mon, May 5, 2008 at 2:49 PM, Anita Graser <anitagraser at gmx.at> wrote:
> >
> > [...]
> >
> >  But in Windows nothing is displayed when i call qgis.exe ...
> >
> >  I'm outputting the debug-info using python "print" function.
> >
> >  Anyone got an idea, how i can access the information printed by
> "print"?
> 
> Hi,
> 
> I'm not sure what's the reason of this behaviour, however you should
> be able to redirect your information:
> 
> import sys
> sys.stdout = open('log.txt', 'a')
> print "hello log"
> 
> After changing sys.stdout all subsequent print calls should go to
> log.txt file. You could also create your own class with write() method
> which can implement any behaviour.
> 
> Martin

-- 
249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro.
Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de


More information about the Qgis-developer mailing list