You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
306 B
15 lines
306 B
7 years ago
|
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)
|