| 90 | | .. caution:: |
|---|
| 91 | | |
|---|
| 92 | | If you're using Windows, remember that the path will contain backslashes. |
|---|
| 93 | | This string is passed through Python's string parser twice, so you need to |
|---|
| 94 | | escape each backslash **twice**:: |
|---|
| 95 | | |
|---|
| 96 | | PythonPath "['c:\\\\path\\\\to\\\\project'] + sys.path" |
|---|
| 97 | | |
|---|
| 98 | | Or, use raw strings:: |
|---|
| 99 | | |
|---|
| 100 | | PythonPath "[r'c:\\path\\to\\project'] + sys.path" |
|---|
| | 90 | .. note:: |
|---|
| | 91 | |
|---|
| | 92 | If you're using Windows, it is still recommended that you use forward |
|---|
| | 93 | slashes in the pathnames, even though Windows normally uses backslashes |
|---|
| | 94 | for its native separator. Apache knows how to convert from the forward |
|---|
| | 95 | slash format to the native format, so this approach is portable and easier |
|---|
| | 96 | to read (it avoids tricky problems with having to double-escape |
|---|
| | 97 | backslashes). |
|---|
| | 98 | |
|---|
| | 99 | This is valid even on a Windows system:: |
|---|
| | 100 | |
|---|
| | 101 | PythonPath "['c:/path/to/project'] + sys.path" |
|---|
| | 102 | |
|---|