http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11402
Revision: 11402 Author: drtrigon Date: 2013-04-21 09:25:43 +0000 (Sun, 21 Apr 2013) Log Message: ----------- minor docu change, important info into docstring instead of comment
Modified Paths: -------------- branches/rewrite/pywikibot/bot.py
Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2013-04-20 20:45:30 UTC (rev 11401) +++ branches/rewrite/pywikibot/bot.py 2013-04-21 09:25:43 UTC (rev 11402) @@ -154,27 +154,27 @@ @param strm: Output stream. If None, re-uses the last stream if one was defined, otherwise uses sys.stderr
+ Note: this function is called by handleArgs(), so it should normally + not need to be called explicitly + + All user output is routed through the logging module. + Each type of output is handled by an appropriate handler object. + This structure is used to permit eventual development of other + user interfaces (GUIs) without modifying the core bot code. + The following output levels are defined: + DEBUG - only for file logging; debugging messages + STDOUT - output that must be sent to sys.stdout (for bots that may + have their output redirected to a file or other destination) + VERBOSE - optional progress information for display to user + INFO - normal (non-optional) progress information for display to user + INPUT - prompts requiring user response + WARN - user warning messages + ERROR - user error messages + CRITICAL - fatal error messages + Accordingly, do ''not'' use print statements in bot code; instead, + use pywikibot.output function. """ - # Note: this function is called by handleArgs(), so it should normally - # not need to be called explicitly
- # All user output is routed through the logging module. - # Each type of output is handled by an appropriate handler object. - # This structure is used to permit eventual development of other - # user interfaces (GUIs) without modifying the core bot code. - # The following output levels are defined: - # DEBUG - only for file logging; debugging messages - # STDOUT - output that must be sent to sys.stdout (for bots that may - # have their output redirected to a file or other destination) - # VERBOSE - optional progress information for display to user - # INFO - normal (non-optional) progress information for display to user - # INPUT - prompts requiring user response - # WARN - user warning messages - # ERROR - user error messages - # CRITICAL - fatal error messages - # Accordingly, do ''not'' use print statements in bot code; instead, - # use pywikibot.output function. - global _handlers_initialized
moduleName = calledModuleName()
pywikipedia-svn@lists.wikimedia.org