Test out small snippets of Django code
I also had this problem before,
may be you could install ipython,which has a magic function called like this:
%save.
This will save what you input into a file .
and ipython is a very charming tool ,which can take the palce of standard python prompt perfectly.. It also have other wonderful things !
And in django , if you have install ipython, when you input python manage.py shell,
it will invoke ipython directly.
I am still in the development phase of a Django App. Before even writing my views.py, I test them out to see if my models are correctly defined. This I do it in the terminal by invoking 
python manage.py shell
But oh so often I make some syntax error prompting me to abort the shell ctrl-D & retype everything. This process is taking forever. It would be better if I could write all this in some file just for my trials & if all's well copy it to views.py. 
What's the process for this? Is it as simple as creating a trial.py in my app directory. Won't I have to import the Django env? What's the best way to do this?