Skip to content

Instantly share code, notes, and snippets.

@thomasballinger
Created February 14, 2016 01:45
Show Gist options
  • Save thomasballinger/d6835481b3822cb5ba2c to your computer and use it in GitHub Desktop.
Save thomasballinger/d6835481b3822cb5ba2c to your computer and use it in GitHub Desktop.
.py files opened by Python just to start up
tomb@localhost:~$ strace python myPythonScript.py 2>&1 >/dev/null | grep open | grep -v ENOENT | grep -o '".*"' | grep -v '\.pyc'
"/etc/ld.so.cache"
"/lib/x86_64-linux-gnu/libpthread.so.0"
"/lib/x86_64-linux-gnu/libc.so.6"
"/lib/x86_64-linux-gnu/libdl.so.2"
"/lib/x86_64-linux-gnu/libutil.so.1"
"/lib/x86_64-linux-gnu/libz.so.1"
"/lib/x86_64-linux-gnu/libm.so.6"
"/usr/lib/python2.7/site.py"
"/usr/lib/python2.7/os.py"
"/proc/meminfo"
"/usr/lib/python2.7/posixpath.py"
"/usr/lib/python2.7/stat.py"
"/usr/lib/python2.7/genericpath.py"
"/usr/lib/python2.7/warnings.py"
"/usr/lib/python2.7/linecache.py"
"/usr/lib/python2.7/types.py"
"/usr/lib/python2.7/UserDict.py"
"/usr/lib/python2.7/_abcoll.py"
"/usr/lib/python2.7/abc.py"
"/usr/lib/python2.7/_weakrefset.py"
"/usr/lib/python2.7/copy_reg.py"
"/usr/lib/python2.7/traceback.py"
"/usr/lib/python2.7/sysconfig.py"
"/usr/lib/python2.7/re.py"
"/usr/lib/python2.7/sre_compile.py"
"/usr/lib/python2.7/sre_parse.py"
"/usr/lib/python2.7/sre_constants.py"
"/usr/lib/python2.7/_sysconfigdata.py"
"/usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py"
"/usr/local/lib/python2.7/dist-packages"
"/usr/local/lib/python2.7/dist-packages/easy-install.pth"
"/usr/lib/python2.7/dist-packages"
"/usr/lib/python2.7/dist-packages/setuptools.pth"
"/usr/lib/python2.7/dist-packages/zope.interface-4.0.5-nspkg.pth"
"/usr/lib/python2.7/sitecustomize.py"
"/usr/lib/locale/locale-archive"
"/usr/lib/python2.7/encodings/__init__.py"
"/usr/lib/python2.7/codecs.py"
"/usr/lib/python2.7/encodings/aliases.py"
"/usr/lib/python2.7/encodings/utf_8.py"
"myPythonScript.py"
"myPythonScript.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment