root/galaxy-central/eggs/GeneTrack-2.0.0_beta_1_dev_48da9e998f0caf01c5be731e926f4b0481f658f0-py2.6.egg/tests/testlib/pathfix.py @ 3

リビジョン 3, 0.6 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1"""
2The sole purpose of this module is to alter the sys.path upon
3importing to add the current genetrack package's path first into
4the import path
5"""
6import sys, os
7
8def path_join(*args):
9    return os.path.abspath(os.path.join(*args))
10
11curr_dir = os.path.dirname( __file__ )
12test_dir = path_join(curr_dir, '..')
13base_dir = path_join(curr_dir, '..', '..' )
14lib_dir  = path_join(base_dir, 'library')
15zip_dir  = path_join(lib_dir, 'library.zip')
16
17for path in [ base_dir, lib_dir, zip_dir ]:
18    if path not in sys.path:
19        sys.path.insert(0, path )
20
21# test that the modules in library.zip are accessible
22import twill, figleaf
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。