Guarded inserts into sys.path.

This commit is contained in:
Jeremy Fincher 2003-08-30 19:20:08 +00:00
parent 7a51fccaf9
commit 442392b5ba
6 changed files with 25 additions and 10 deletions

View File

@ -2,7 +2,9 @@
import sys import sys
if 'sys' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
if 'others' not in sys.path:
sys.path.insert(0, 'others') sys.path.insert(0, 'others')
from fix import * from fix import *

View File

@ -29,7 +29,10 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import sys import sys
if 'src' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
from fix import * from fix import *
from questions import * from questions import *

View File

@ -2,6 +2,8 @@
import os import os
import sys import sys
if 'src' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
from questions import * from questions import *

View File

@ -40,6 +40,8 @@ import time
import optparse import optparse
started = time.time() started = time.time()
if 'src' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
import conf import conf

View File

@ -30,14 +30,17 @@
### ###
import sys import sys
if 'src' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
if 'test' not in sys.path:
sys.path.insert(0, 'test') sys.path.insert(0, 'test')
sys.path.insert(0, 'plugins')
import conf import conf
conf.dataDir = 'test-data' conf.dataDir = 'test-data'
if conf.pluginDir not in sys.path:
sys.path.insert(0, conf.pluginDir)
from fix import * from fix import *
import gc import gc

View File

@ -5,7 +5,10 @@ Converts from a "key => value\n" format to a cdb database.
""" """
import sys import sys
if 'src' not in sys.path:
sys.path.insert(0, 'src') sys.path.insert(0, 'src')
import re import re
import cdb import cdb