Behaviour of os.path.join
Grant Edwards
grant.b.edwards at gmail.com
Tue May 26 16:34:50 EDT 2020
On 2020-05-26, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> I'd also like to point out that the nasty "\\" is not needed. Windows
> API understands "/" -- it is only the command line "DOS" shell that
> requires back-slash
Many, many applications also require that backslashes be used in path
arguments (whether or not they're being executed via the "DOS" shell).
Interestingly, the _real_ DOS shell from several decades ago let you
change the "option" character from "/" to anything you wanted ("-" is
one correct answer), and the shell would then be perfectly happy with
forwards slashes in paths. But, there were still plenty of
applications that whould choke on forward slashes in path
arguments. Apparently a lot of application developers were ignorant of
the fact that the system option character was configurable by the
user.
Thank Dog for the MKS toolkit.
> Powershell is happy with / since options are prefixed with - ).
One point to Microsoft on that one (they're still way behind).
--
Grant
More information about the Python-list
mailing list