File: __init__.py

package info (click to toggle)
python-docutils 0.16%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,864 kB
  • sloc: python: 45,783; lisp: 14,475; xml: 1,785; javascript: 1,032; sh: 140; makefile: 111
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)