-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yeah Merlijin in right! The loggining module should be used!
I myself had a look at 'pywikibot.output' some time ago. To me it seems we would have to modify 'output' from modules at 'userinterfaces' directory (look at lines 7858-7860 in 'wikipedia.py'). Or even better create a new 'logging' user- interace module in order to use the 'logging' module there. Then finally we can suppress logging be setting the level or else there. What do you think? Greetings DrTrigon ps.: It is not that simple and fast as it looks, that is the reason why it did not solve this already... On 22.02.2012 11:38, Merlijn van Deen wrote: > On 22 February 2012 11:24, Bináris <[email protected] > <mailto:[email protected]>> wrote: > > 1. Let's introduce a new config parameter suppress with default > False. 2. pywikibot.output should return immediately upon > detecting suppress=True. One central handle for majority of screen > outputs. > > How would this be different from > > python bot.py 2>&1 > /dev/null > > ? > > Furthermore, the logging module is *not* difficult and a lot of > useful wrapper functions for pywikipedia already exist in the > rewrite branch: > http://svn.wikimedia.org/viewvc/pywikipedia/branches/rewrite/pywikibot/bot.py?view=markup > > (around line 217) > > Best, Merlijn > > > _______________________________________________ Pywikipedia-l > mailing list [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9EzYMACgkQAXWvBxzBrDBWKwCfRWtFI6KLB7ceJzlGawy/TQC0 UusAoOLZ19Bo3ZoJcS+WBA+CbUw8BbKN =oENl -----END PGP SIGNATURE----- _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
