diff options
Diffstat (limited to 'find-python-path.py')
-rwxr-xr-x | find-python-path.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/find-python-path.py b/find-python-path.py new file mode 100755 index 0000000..21ecb12 --- /dev/null +++ b/find-python-path.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import sys +from os.path import split, basename + +def find_path (): + for path in sys.path: + (head, tail) = split (path) + if tail == 'site-packages': + base = basename (head) + print base + '/' + tail + return + +find_path () |