Blender Materials GLSL

Is there anyways to attach a GLSL shaders to a materials using python or…? I saw theses DirectX HLSL Materials in MAX and well… I want to be able to do the same in Blender (with GL o’course) how can I do it?

ps: Is it possible now to get the texture attached to a lamp using python?