This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# To parse ics attachments in mutt, put this in your ~/.mailcap: | |
# | |
# text/calendar; /path/to/ical_print.py; copiousoutput | |
# | |
# Otherwise, you can either pass a an .ics file as a parameter, or pipe | |
# something to it on stdin. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your_app/models.py | |
def suite(): | |
"""Django test discovery.""" | |
import nose | |
import unittest | |
path = os.path.join(os.path.dirname(__file__), 'tests') | |
suite = unittest.TestSuite() | |
suite.addTests(nose.loader.TestLoader().loadTestsFromDir(path)) | |
return suite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import fileinput | |
lines = list(fileinput.input()) | |
if len(lines) != 2: | |
raise Exception("Input must be a pair of lines to diff") |
NewerOlder