Some more notes
Peter Hansen
peter at engcorp.com
Sun Oct 24 09:42:37 EDT 2004
David Bolen wrote:
> Peter Hansen <peter at engcorp.com> writes:
>
>>That's not necessary in almost all cases. Windows happily(*)
>>accepts forward slashes in all system calls. The only place
>>it does not is in the *shell* (aka command.com and cmd.exe). (...)
>
> Actually, almost all system calls. I don't have the precise list
> handy, but there are some related to networking that use UNC names
> that expect to see a machine name supplied as a string as "\\machine"
> and will not accept "//machine".
Have you verified that those calls would *not* accept
something like "\\machine/share/path/file"?
If they accept this, then I would simply argue that the \\machine
part has nothing to do with a path, other than the accident
of sharing (but doubling) the backslash that we're used to
in Windows paths. It's a machine name, not a path, similar to
how C: is a drive name, not a path, and therefore needs special
handling.
After all, you don't expect to be able to use C/ instead of C:,
and I don't think one should necessarily expect //machine to
work instead of \\machine.
This is mostly supposition/theory/wild hand-waving, however.
I don't know the reality. If you post a few of the APIs that
you mention, I can try to disprove my theory.
-Peter
More information about the Python-list
mailing list