mbligh | b090f14 | 2008-02-27 21:33:46 +0000 | [diff] [blame^] | 1 | """\ |
| 2 | This abortion of a file is here so we can access stuff in |
| 3 | client/common_lib |
| 4 | """ |
| 5 | |
| 6 | __author__ = "raphtee@google.com (Travis Miller)" |
| 7 | |
| 8 | import os, sys |
| 9 | |
| 10 | dirname = os.path.dirname(sys.modules[__name__].__file__) |
| 11 | client_dir = os.path.abspath(os.path.join(dirname, "..", 'client')) |
| 12 | |
| 13 | # insert client into top of path |
| 14 | sys.path.insert(0, client_dir) |
| 15 | import common_lib |
| 16 | from common_lib import * |
| 17 | |
| 18 | # remove top of path |
| 19 | del sys.path[0] |
| 20 | |
| 21 | for library in common_lib.__all__: |
| 22 | sys.modules['common.%s' % library] = eval(library) |
| 23 | |
| 24 | # clean up the namespace |
| 25 | del dirname, client_dir, library |
| 26 | del os, sys, common_lib |