Behaviour of os.path.join
MRAB
python at mrabarnett.plus.com
Tue May 26 15:26:44 EDT 2020
On 2020-05-26 16:52, Dennis Lee Bieber wrote:
> On Tue, 26 May 2020 16:22:27 +0100, Ben Bacarisse <ben.usenet at bsb.me.uk>
> declaimed the following:
>
>>I think it is. The picture is messy on Windows (because of the drive
>>letter) but absolute paths are usually taken to be those that start with
>>a path separator.
>
> The drive letter is only required if one needs to access something that
> is not on the "currently logged drive". Compare:
>
[snip]
>
> 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 (since / is used for command options, Powershell is
> happy with / since options are prefixed with - ).
>
Dialog windows, e.g. Open and Save dialogs, also require backslashes.
[snip]
More information about the Python-list
mailing list