On 15/06/14 23:45, SeldomNeedy wrote:
import sys
sys.stderr = open("C:\\tmp\\errs.txt",'a')

This will cause the python environment to show some otherwise-hidden startup and
register-registration errors by outputting / printing them to the specified
location. The example I saw used mode 'a' to append errors, rather than
overwrite. Doing this allowed me to spot a mistake I was making.

In addition, one can also do

import sys
sys.stout = open("C:\\"tmp\\msgs.txt",'a')

if it's more convenient to receive output this way.

Actually you can have both outputs to the same file:

|sys.stderr = open('C:/temp/python-fu-output.txt','a')

And of course, when done you can keep the print instructions if you reroute everything to the bit-bucket:
|import os
sys.stderr = open(os.path.devnull,'a')|
gimp-user-list mailing list
List address:    gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list

Reply via email to