Installing pip

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-setuptools
sudo easy_install pip

emailing from gmail account 

look at Rpi forum thread – the working version is about 1/2 way through

filename manipulation

Creating zip files

Dates and times

make sure you ‘include’

import datetime
from datetime import datetime

usage syntax for producing ‘friendly’ date formats is;‘%a, %H:%M’)

for details of strftime usage see



basic motion detection with Python


USB Support

The first line is generally not required as it is installed already, likewise the second only needs be done once.

The upgrade option can be important as earlier versions [below 1.x.x] of pyusb do not have ‘usb.core’ included which will often result in ‘no module named core’ errors where the python code is expecting it.

sudo apt-get install python libusb-1.0
sudo apt-get install python-pip
sudo pip install --upgrade pyusb