[Qgis-developer] Debugging Plug-Ins in Windows

Martin Dobias wonder.sk at gmail.com
Mon May 5 10:39:00 EDT 2008


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


More information about the Qgis-developer mailing list