This is python 2.7 on MacOS
Here's my testcase - file called mytest.py:
import sys
print sys.modules.keys()
I run as python -s mytest.py.
output is:
['google', 'copy_reg', 'sre_compile', '_sre', 'encodings', 'site', '__builtin__', 'sysconfig', '__main__', 'encodings.encodings', 'abc', 'posixpath', '_weakrefset', 'errno', 'google.logging', 'encodings.codecs', 'sre_constants', 're', '_abcoll', 'types', '_codecs', 'encodings.__builtin__', '_warnings', 'genericpath', 'stat', 'zipimport', '_sysconfigdata', 'warnings', 'UserDict', 'encodings.utf_8', 'sys', '_osx_support', 'codecs', 'os.path', '_locale', 'signal', 'traceback', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'os', '_weakref']
I believe that google is being imported via a .pth file that is processed by the automatically imported site.py, but my understanding is that the -s switch suppresses the automatic site.py import.
What is causing "google" to be imported?