Author: mtredinnick
Date: 2007-10-19 22:21:51 -0500 (Fri, 19 Oct 2007)
New Revision: 6536

Modified:
   django/trunk/docs/modpython.txt
Log:
Fixed #4854 -- Recommended the use of forward slashes even in Windows 
configuration, to avoid having to worry about double-escaping issues. Based on 
a patch from adamv.


Modified: django/trunk/docs/modpython.txt
===================================================================
--- django/trunk/docs/modpython.txt     2007-10-19 15:43:45 UTC (rev 6535)
+++ django/trunk/docs/modpython.txt     2007-10-20 03:21:51 UTC (rev 6536)
@@ -87,17 +87,19 @@
 **parent directories** of anything you import directly must be on the Python
 path.
 
-.. caution::
+.. note::
 
-    If you're using Windows, remember that the path will contain backslashes.
-    This string is passed through Python's string parser twice, so you need to
-    escape each backslash **twice**::
+    If you're using Windows, it is still recommended that you use forward
+    slashes in the pathnames, even though Windows normally uses backslashes
+    for its native separator. Apache knows how to convert from the forward
+    slash format to the native format, so this approach is portable and easier
+    to read (it avoids tricky problems with having to double-escape
+    backslashes).
 
-        PythonPath "['c:\\\\path\\\\to\\\\project'] + sys.path"
+    This is valid even on a Windows system::
 
-    Or, use raw strings::
+        PythonPath "['c:/path/to/project'] + sys.path"
 
-        PythonPath "[r'c:\\path\\to\\project'] + sys.path"
 
 You can also add directives such as ``PythonAutoReload Off`` for performance.
 See the `mod_python documentation`_ for a full list of options.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to