L.E.I.C.A. (Long Exposure Internet CAmera) is an application that takes input from your webcam, or v4l2 device, and makes a long-exposure image.
Until now there's only a python binding for this app, soon there will be a C/C++ SDL one
Pysolar is a Python library for calculating the position of the sun relative to the earth as a function of latitude, longitude, and time. There is also code included for other problems related to the development of photovoltaic systems. Still in alpha.