These instructions aren't Python-specific, but they might help
you get started with experimenting with GPIO.
http://raspberrypi.stackexchange.com/a/350/668 has info about a
library and usage specific for Python. When you have booted your
Raspberry Pi using the recommended Debian distro, GPIO is
disabled. You have to enable each pin individually. If you're
doing it via /sys you will find "Paths in Sysfs" interesting
(search within
http://www.kernel.org/doc/Documentation/gpio.txt). In
particular, you would be enabling a pin by "exporting" it. Any
commands below assume you are running as root privileges (sudo
or otherwise) or you have changed the permissions/ownership of
the virtual files being modified. echo 4 >
/sys/class/gpio/export This enables the GPIO pin #4 which then
causes /sys/class/gpio/gpio4 to exist, which contains several
virtual files. Those files include "direction" which defines
whether it's an input or an output pin, "value" which is either
read-only for input or writable for output and contain