I have a script which uses the Django ORM features, amongst other external libraries, that I want to run outside of Django (that is, executed from the command-line).
Edi
Note that the suggestions around importing settings and using setup_environ have been deprecated with Django 1.4.
There's a thread on the Django Github describing why this was done.
There are still some other options out there but many of them seem hackish to me. My preferred method is often to include the scripted function as an extended command of manage.py