summaryrefslogtreecommitdiff
path: root/find-python-path.py
blob: 21ecb12237bf88292f0267a4ed65bcc615d42ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 ()