i3pystatus creates a logger that can be imported via import i3pystatus.logger . Thus when modules enable the 'enable_log' setting, it should log i3pystatus errors to a file called '.i3pystatus-<pid>'. This commit only solves the case when email_client was called in the email module and would output things into stderr/stdout.
Various pep8 and comments removal + converted shell module to use run_through_shell command
Added missing r to IntevalSettings in test_core_modules
Make sure that we use python3 pep8
This commit improves the logging system: instead of setting a boolean to enable logging, the user sets a logging level (per module). By default only critical errors are logged (ie nothing for now).

Also adds a test for the function run_through_shell
Merge pull request #147 from teto/log_stderr

Log stderr
Simple fix for notmuch database not in sync
Added doc for unread method in mail/__init__/py + make sure that db is closed before deleting the notmuch db object
Merge pull request #148 from teto/simple_fix_notmuch

Simple fix for notmuch database not in sync
This commit introduces a skeleton that allows personalized callbacks in
a backwards compatible way. Settings 'on_lclick','on_rclick',
'on_scrollup','on_scrolldown' are inherited by all modules.
These parameters should be a string. Then when a matching action is
detected (ie mouseclick, scrolling), the module check if this string
corresponds to a:
1/ python callable
2/ module method,
In cases 1 and 2, it calls the python function with the module as the
first parameter. Otherwise it considers the string is an external command and launches it via run_through_shell
Updated alsa & clock modules with new mechanism
Follow up of https://github.com/enkore/i3pystatus/pull/149#issuecomment-67712619 .

This commit removes and replaces all the old methods 'on_*' by settings
with the same name. The old methods were renamed into more explicit names that can be used for the callbacks like "next_song","mute" etc...
For instance, you can test with:
status.register("clock",
	format=[
	    ("Format 0",'Europe/London'),
	    ("%a %-d Format 1",'Europe/Dublin'),
	    "%a %-d %b %X format 2",
	    ("%a %-d %b %X format 3", 'Europe/Paris'),
	],
	on_leftclick= ["urxvtc"] , # launch urxvtc on left click
	on_rightclick= ["scroll_format", 2] , # update format by steps of 2
	log_level=logging.DEBUG,
	)

This way much code could be removed from other modules, though I did it only for the clock module here.
Fix in documentation
This commit adds a basic test to check callbacks work.
This can also serve as an exemple.
Merge pull request #149 from teto/cb

Allowing for personalized callbacks while keeping backwards compatibility
added ngb module
changed ip for internet ccheck to wikipedia