[Q]How to append paths in a platform-independent way?
oren-py-l at hishome.net
Wed Apr 2 09:02:32 CEST 2003
On Tue, Apr 01, 2003 at 09:00:48PM -0800, Dennis Lee Bieber wrote:
> sdhyok fed this fish to the penguins on Tuesday 01 April 2003 07:46 pm:
> > How to do the following jobs in a platform-independent way?
> > path = /home/sdhyok
> This is already platform dependent... it doesn't mean the same thing
> in Windows.
Actually, it does. Windows accepts slash-separated paths just fine at the
API level. Even mixed use works ok. The command processor and other
command-line utilities require backslashes because they use forward slash
MacOS (not OS X) is probably the only major OS that does not accept
slashes (any Mac owners out there can confirm that?)
More information about the Python-list