pybedtools is a Python wrapper for Aaron Quinlan's BEDtools and is designed to leverage the "genome algebra" power of BEDtools from within Python scripts.
This documentation is written assuming you know how to use BEDTools and Python.
See full online documentation, including installation instructions, at http://daler.github.com/pybedtools.