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 | |
""" Show the difference between the versions of manually installed | |
packages on this system with the given distribution. | |
""" | |
import re | |
import sys | |
def main(): | |
if not distribution(): | |
sys.stderr.write("Could not determine distribution from /etc/os-release\n") |
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
""" | |
Demonstration of using python generators as coroutines to implement | |
cooperative multi-tasking. Catting multiple files in chunks to stdout. | |
There is room for much more generationization of operators, for example | |
implementing the yielding value as a Future. | |
Pass in a list of file names. | |
""" | |
import sys |
NewerOlder