DoBy looks very interesting, basically, it will raise exception when the current time has passed the specified time, for example:
>>> from doby import TODO >>> from datetime import datetime, timedelta >>> delta = timedelta(seconds=1) >>> now = datetime.now() >>> TODO('I need to come back to this', now + 60 * delta) >>> TODO('I need to come back to this', now - delta) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "doby/__init__.py", line 38, in TODO DoBy(note, doby) File "doby/__init__.py", line 28, in __init__ raise self doby.DoBy: TODO: I need to come back to this >>> TODO('I need to come back to this', now) Traceback (most recent call last): ... doby.DoBy: TODO: I need to come back to this >>> TODO('I need to come back to this', '17-05-2013') Traceback (most recent call last): ... doby.DoBy: TODO: I need to come back to this
Interesting as I said, but it might not be reliable due to the nature of the code. Think about coverage.py, got what I am thinking about it? The raised exception might come too late or never come.
Still, this is a unique conception to implement a notifiable TODO.
DoBy is written by Adam Drakeford under the MIT License, currently version 1.0.2 (2014-05-17), for both Python 2 and 3.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.