blob: c037618c332b39c220d959b8f2d1f9c708e78791 [file] [log] [blame]
Guido van Rossum1bc716f1996-06-28 19:12:06 +00001import 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
7try:
8 import string
9except:
10 print """Could not import the standard "string" module.
11Please check your PYTHONPATH environment variable."""
12 sys.exit(1)
13
14try:
15 import regex_syntax
16except:
17 print """Could not import the standard "regex_syntax" module. If this is
18a PC, you should add the dos_8x3 directory to your PYTHONPATH."""
19 sys.exit(1)
20
21import os
22
23for dir in sys.path:
24 file = os.path.join(dir, "string.py")
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
31import autotest # Standard Python tester.