Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwilk/python-syspath-tracker
track who changes Python's sys.path
https://github.com/jwilk/python-syspath-tracker
python qa
Last synced: about 1 month ago
JSON representation
track who changes Python's sys.path
- Host: GitHub
- URL: https://github.com/jwilk/python-syspath-tracker
- Owner: jwilk
- License: mit
- Created: 2018-02-24T12:33:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T19:41:06.000Z (9 months ago)
- Last Synced: 2024-08-09T00:22:14.296Z (5 months ago)
- Topics: python, qa
- Language: Python
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
.. code:: console
$ cat test.py
import sys
import syspath_tracker
syspath_tracker.install()
def f():
sys.path += ['/eggs']
def g():
del sys.path[0]
f()
g()$ python test.py
Initial sys.path = [
'/home/jwilk/python-syspath-tracker',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-i386-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
]
sys.path changed at test.py:5: [
'/home/jwilk/python-syspath-tracker',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-i386-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
+ '/eggs',
]
sys.path changed at test.py:7: [
- '/home/jwilk/python-syspath-tracker',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-i386-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/eggs',
].. vim:ft=rst ts=3 sts=3 sw=3 et