Comment 7 for bug 197219

Revision history for this message
Thomas Güttler (hv-tbz-pariv) wrote :

Ubuntu 18.04 does come with a sitecustomize.py file.

I think this is not a good solution.

I would really like to be able to execute some python code during interpreter start.

AFAIK sitecustomize.py is the way to got. But if ubuntu provides one, then this does not work.

Related question: https://stackoverflow.com/questions/52449602/how-to-set-environment-variables-in-virtualenv-started-via-python

root@1b3dffd4d058:/# python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
>>> import sitecustomize
>>> sitecustomize.__file__
'/usr/lib/python2.7/sitecustomize.pyc'

root@1b3dffd4d058:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"