Python code snippets. Suggestions for improvements are highly encouraged.
My starting template when creating new python CLI functions
Useful function to link optparse/parseargs with a "main" function. Saves repeating parameter names.
Because I can never remember how to make an existing file non-blocking.
Collegue at work asked for a good "little project" to learn intermediate-to-advanced Python features. Using A* to solve the 15-puzzle is something I keep reimplementing to just about the same thing for myself. So, that's what I suggested, and here's my current implementation.
Python's 'logging' module is awesome. Python's documentation for the module is less so; it really needs some examples on how to piece things together if you're not using basicConfig or the logging config modules. First example is a "basicConfig" ish thing for sending stuff to the local syslog.