Opened 17 years ago
Closed 17 years ago
#4854 closed (fixed)
backslashes not required on windows
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | path backslash | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
apache installation manual says
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:
PythonPath "c:\\\\path\\\\to\\\\project + sys.path"
Or, use raw strings:
PythonPath "[r'c:
path
to
project'] + sys.path"
but forward slashes work just fine here on windows and is less confusing than
, just remind them that forward slashes are preferred and to not try to figure out the
pattern.
Attachments (1)
Change History (7)
follow-up: 2 comment:1 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Replying to SmileyChris:
The reporter is recommending forward slashes, not unescaped backslashes.
comment:3 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
John, so they are. I'll promote do Design Decision
by , 17 years ago
comment:4 by , 17 years ago
Has patch: | set |
---|
Forward slashes are expected on Windows for Apache's built-in directives, so it makes sense to recommend them here as well.
comment:5 by , 17 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
Elsewhere (settings) we recommend using forward slashes, so I guess we should do that everywhere. Simple is good.
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Assuming that the string is parsed twice, you should be double-escaping your path. It may just be coincidence that you haven't caused an error because you aren't using escapable characters.
For example,
c:\path\here
would be fine, butc:\path\to\here
wouldn't be.