From BlenderWiki
Module
Lamp gives the scripter access to Blender lamp data. The Lamp module itself has only two methods =new()= and =get()=. Both return a lamp datum which can be further manipulated by either using methods of the object or by directly using member variables.
-- Create a new Lamp datum of type Hemi lampdat = Lamp.new(Lamp.Hemi) -- Create a new Lamp datum of type Sun with name LuaSun lampdat2 = Lamp.new(Lamp.Sun, "LuaSun") -- Get an existing Lamp datum with name "LuaSun" lampdat3 = Lamp.get("LuaSun")