pingswept/pysolar — pull request #4 by pjkundert (2012-06-29 22:20:50+00:00)
Title: Clean up installed files; move all installed files into a Pysolar directory

When installing, all the python files for Pysolar used to be installed directly into the Python modules root directory. While convenient (allowed you to simply "import solar"), it was not ideal; it resulted in a cluttered Python modules installation, etc.

Now, all files are installed under a Pysolar directory; by default, everything from "solar.py" is made available when Pysolar is imported.

import Pysolar as solar # was: import solar
import Pysolar.util as util # was: import util

Some of the examples should be changed; instead of:

import solar
solar.GetAltitude(...)

you must now use:

from Pysolar import solar
solar.GetAltitude(...)

or better yet (since everything from Pysolar/solar.py is imported automatically when Pysolar is imported):

import Pysolar
import Pysolar.util
Pysolar.GetAltitude(...)
Pysolar.util.mean_earth_sun_distance(...)