if 'HOME' in os.environ:
    home = os.environ['HOME']
elif os.name == 'posix':
    home = os.path.expanduser('~/')
home = os.path.realpath(home) + os.sep
histfile = home + '.pyhist'
How do I get Plone to read my pythonrc?