If you have set up your PYTHONSTARTUP environment variable to point to ~/.pythonrc.py in your .bashrc file or something similar but you get errors of the sort:

tayfun@olive:~$ python
Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Could not open PYTHONSTARTUP
IOError: [Errno 2] No such file or directory: '~/.pythonrc.py'

even though your file is there, simply set your environment variable with the full path, ie. /home/tayfun/.pythonrc.py in my case.

Hope this helps you if you stumbled into this error too :)