Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# LGPLv2 yadda yadda yadda, do whatever, yadda yadda yadda, bum it in the gob, yadda yadda yadda
import bluetooth, datetime, optparse, time, os, user, pynotify, tempfile, twitter, sys
# Install required packages on Ubuntu:
# sudo aptitude install python-twitter python-notify python-bluetooth festival
# Set these values if you wish to use Twitter (you probably won't, but then I didn't really want too but it happended anyway)
r"""Simple module for quick document manipulation from the gedit Python console
Example:
import doc
d = doc.Doc(window)
d.set_lines( ['one', 'two', 'three'] )
d.append('\n')
d.append('four')
lines = d.get_lines()
lines.reverse()