The short answer is no...
The red PWR LED is hardwired to the on-board 3.3V.
The FDX, LNK and 10M LEDs are hardwired to the USB/Ethernet chip.
The green OK LED is hardwired to GPIO 16 and is programmed in the 'firmware' to indicate SD card activity: It may be possible to control this one, but only from low level code, which is well beyond me. Only someone like dom will know the answer to that.

The green OK LED can be controlled from software. It's available as /sys/class/leds/led0/

The kernel LED driver, which controls led0, has "triggers" which let some other part of the kernel control the LED. The default trigger for the LED is 'mmc0', which makes it come on when the SD card is accessed.

root@raspberrypi:~# cat /sys/class/leds/led0/trigger
none [mmc0]

Here, the mmc0 trigger is selected. You can deactivate this as follows:

echo none >/sys/class/leds/led0/trigger

The LED can be turned on and off using the 'brightness' file. The minimum brightness is 0, and the maximum is 255 (specified in the 'max_brightness' file). However, as there is no hardware support for variable brightness, any value greater than 0 will turn the LED on.

#!/usr/bin/python
import RPi.GPIO as GPIO
from time import sleep
# Needs to be BCM. GPIO.BOARD lets you address GPIO ports by periperal
# connector pin number, and the LED GPIO isn't on the connector
GPIO.setmode(GPIO.BCM)
# set up GPIO output channel
GPIO.setup(16, GPIO.OUT)
# On
GPIO.output(16, GPIO.LOW)
# Wait a bit
sleep(10)
# Off
GPIO.output(16, GPIO.HIGH)

It's important to note that RPi.GPIO will set the GPIO port to be an input when it's finished (it sets to an input any port which the script set to an output, and you have to set it to an output before you can do anything with it, even if it already was). As GPIO16 stops being an output, control via the kernel interface will no longer work.

[quote="simplesi"Am I right in thinking that no real harm will occur to small fruit objects by forgetting to ask for/take or not hand back control of the LED from python using the GPIO lib?[/quote]
Yes you are right.

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

This reply has nothing to do with the online LED, but I saw that the question of getting the current IP came up. I had the same problem and solved it through espeak and the audio output by adding the following code to /etc/rc.local:

plugwash, you're looking in the wrong datasheet. That datasheet is just for the hardware. You need a different datasheet to find out how to program the USB Hub / Ethernet controller. It will explain how to change the pin assignment from Ethernet signals to GPIO control.

Reusing the existing 3 LEDs is possible by software, but needs to rebuild the kernel. I think (hope) that the other 5 pins can be used by compiling new C code, but without rebuilding the kernel. Probably a kernel module; hopefully a root-land app.