This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.golden
Recipients JosephArmbruster, georg.brandl, tim.golden
Date 2007-12-02.21:15:05
SpamBayes Score 0.019805444
Marked as misclassified No
Message-id <1196630105.88.0.679874762145.issue1520@psf.upfronthosting.co.za>
In-reply-to
Content
OK, hacking away a bit further, I think I've found a solution, but I'll
need to tidy it up a bit. In essence, the problem is that the "filename"
is trying to be two things: the pointer for the local filesystem, and
the uri for the web server. On *nix, this will pretty much work. On
Windows -- and elsewhere, it won't.

My approach is to treat the filename a little like unicode: decode to
"web-format" on the way in; encode to "local-format" on the way out. In
practice, this resolves to a bunch of .replace(path.sep, "/") calls in
one place and .replace("/", path.sep) in the comparatively rare cases we
actually need to read the local filesystem.

I realise that, on Windows, I could get a bit hacky and just assume that
"/" will work throughout. But that obviously fails now for things like
VMS and in the future for the hypothetical filesystem which uses "." as
its separator etc.

I'm still working it through. The web and html versions are certainly
working but I need to check out htmlhelp which has its own special needs.
History
Date User Action Args
2007-12-02 21:15:06tim.goldensetspambayes_score: 0.0198054 -> 0.019805444
recipients: + tim.golden, georg.brandl, JosephArmbruster
2007-12-02 21:15:05tim.goldensetspambayes_score: 0.0198054 -> 0.0198054
messageid: <1196630105.88.0.679874762145.issue1520@psf.upfronthosting.co.za>
2007-12-02 21:15:05tim.goldenlinkissue1520 messages
2007-12-02 21:15:05tim.goldencreate