Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 1 | import sys |
| 2 | |
| 3 | # This is a test module for Python. It looks in the standard |
| 4 | # places for various *.py files. If these are moved, you must |
| 5 | # change this module too. |
| 6 | |
| 7 | try: |
Neal Norwitz | 10be10c | 2006-03-16 06:50:13 +0000 | [diff] [blame] | 8 | import os |
Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 9 | except: |
Neal Norwitz | 10be10c | 2006-03-16 06:50:13 +0000 | [diff] [blame] | 10 | print """Could not import the standard "os" module. |
Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 11 | Please check your PYTHONPATH environment variable.""" |
| 12 | sys.exit(1) |
| 13 | |
| 14 | try: |
Neal Norwitz | 10be10c | 2006-03-16 06:50:13 +0000 | [diff] [blame] | 15 | import symbol |
Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 16 | except: |
Neal Norwitz | 10be10c | 2006-03-16 06:50:13 +0000 | [diff] [blame] | 17 | print """Could not import the standard "symbol" module. If this is |
Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 18 | a PC, you should add the dos_8x3 directory to your PYTHONPATH.""" |
| 19 | sys.exit(1) |
| 20 | |
| 21 | import os |
| 22 | |
| 23 | for dir in sys.path: |
Neal Norwitz | 10be10c | 2006-03-16 06:50:13 +0000 | [diff] [blame] | 24 | file = os.path.join(dir, "os.py") |
Tim Peters | fe8a566 | 2006-03-01 06:28:58 +0000 | [diff] [blame] | 25 | if os.path.isfile(file): |
| 26 | test = os.path.join(dir, "test") |
| 27 | if os.path.isdir(test): |
| 28 | # Add the "test" directory to PYTHONPATH. |
| 29 | sys.path = sys.path + [test] |
| 30 | |
| 31 | import regrtest # Standard Python tester. |
| 32 | regrtest.main() |