File: __init__.py

package info (click to toggle)
python-docutils 0.13.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,728 kB
  • ctags: 7,259
  • sloc: python: 43,776; lisp: 13,142; xml: 1,644; sh: 164; makefile: 151
file content (14 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (59)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import os.path
import sys

sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
prev = ''
while sys.path[0] != prev:
    try:
        import DocutilsTestSupport
        break
    except ImportError:
        prev = sys.path[0]
        sys.path[0] = os.path.dirname(prev)
sys.path.pop(0)