On 5/28/20, Roel Schroeven wrote:
> Eryk Sun schreef op 28/05/2020 om 15:51:
>> On 5/27/20, Chris Angelico wrote:
>>> On Thu, May 28, 2020 at 7:07 AM BlindAnagram
>>> wrote:
You can define a path however you want but it won't change the fact
that on Windows a path that ends in '\\' is
On 2020-05-28 22:34, Terry Reedy wrote:
On 5/28/2020 9:19 AM, Eryk Sun wrote:
On 5/26/20, BlindAnagram wrote:
But if I try to make the directory myself (as I tried first):
join(base, '..\\..\\', 'build', '\\')
I obtain:
'C:\\'
The documentation says that an absolute path in the paramet
BlindAnagram schreef op 28/05/2020 om 11:00:
On 27/05/2020 23:39, Roel Schroeven wrote:
I find no hints of adding a backslash at the end to indicate directories.
If you can point me to convincing evidence in the documentation I'll
change my mind.
And if you find a counterexample, I will change
Eryk Sun schreef op 28/05/2020 om 15:51:
On 5/27/20, Chris Angelico wrote:
On Thu, May 28, 2020 at 7:07 AM BlindAnagram
wrote:
You can define a path however you want but it won't change the fact that
on Windows a path that ends in '\\' is inherently a path to a directory.
Citation needed.
On 5/28/2020 9:19 AM, Eryk Sun wrote:
On 5/26/20, BlindAnagram wrote:
But if I try to make the directory myself (as I tried first):
join(base, '..\\..\\', 'build', '\\')
I obtain:
'C:\\'
The documentation says that an absolute path in the parameter list for
join will discard all previou
On 2020-05-27, Roel Schroeven wrote:
> I find no hints of adding a backslash at the end to indicate directories.
I suspect that, like Unix, that's not an OS/filesystem thing but
merely a convention used by some user space applications to allow the
user to provide an additional hint as to his int
On 27/05/2020 23:39, Roel Schroeven wrote:
> I find no hints of adding a backslash at the end to indicate directories.
>
> If you can point me to convincing evidence in the documentation I'll
> change my mind.
See the post from Eryk Sun, later in this thread.
--
https://mail.python.org/mailman/
On 5/28/20, BlindAnagram wrote:
>
> Thank you for making the effort to answer a number of issues raaised in
> this thread. I much appreciate your input.
For a more practical POV, see the topic on "File System Navigation"
[1] for the C++ standard API. In the C++ standard
library, trailing slashe
On 28/05/2020 14:51, Eryk Sun wrote:
> On 5/27/20, Chris Angelico wrote:
>> On Thu, May 28, 2020 at 7:07 AM BlindAnagram
>> wrote:
>>> You can define a path however you want but it won't change the fact that
>>> on Windows a path that ends in '\\' is inherently a path to a directory.
>>
>> Citati
On 5/27/20, Chris Angelico wrote:
> On Thu, May 28, 2020 at 7:07 AM BlindAnagram
> wrote:
>> You can define a path however you want but it won't change the fact that
>> on Windows a path that ends in '\\' is inherently a path to a directory.
>
> Citation needed.
See [MS-FSA] 2.1.5.1 Server Reque
On 5/26/20, BlindAnagram wrote:
>
> But if I try to make the directory myself (as I tried first):
>
> join(base, '..\\..\\', 'build', '\\')
>
> I obtain:
>
> 'C:\\'
>
> The documentation says that an absolute path in the parameter list for
> join will discard all previous parameters but '\\' is
On 27/05/2020 23:39, Roel Schroeven wrote:
> BlindAnagram schreef op 27/05/2020 om 22:55:
>> On 27/05/2020 18:42, Roel Schroeven wrote:
>>> BlindAnagram schreef op 27/05/2020 om 18:53:
Its not my bug to fix - the semantics of what I send is very clear on
any Windows system.
>>>
>>> That's
On Thu, May 28, 2020 at 7:07 AM BlindAnagram wrote:
> You can define a path however you want but it won't change the fact that
> on Windows a path that ends in '\\' is inherently a path to a directory.
Citation needed.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
BlindAnagram schreef op 27/05/2020 om 22:55:
On 27/05/2020 18:42, Roel Schroeven wrote:
BlindAnagram schreef op 27/05/2020 om 18:53:
Its not my bug to fix - the semantics of what I send is very clear on
any Windows system.
That's the first time I see any mention of those semantics, and I've
b
...
Again, a pathname is never inherently a directory or a file.
See previous contribution: until YOU define YOUR arena of operations, it
will be difficult to select the correct tool or library - or for others
to assist you.
If dealing with strings (which happen to look as if they are
fil
On 27/05/2020 18:42, Roel Schroeven wrote:
> BlindAnagram schreef op 27/05/2020 om 18:53:
>> Its not my bug to fix - the semantics of what I send is very clear on
>> any Windows system.
>
> That's the first time I see any mention of those semantics, and I've
> been using Windows since the Windows
On 27/05/2020 18:37, Roel Schroeven wrote:
> BlindAnagram schreef op 27/05/2020 om 18:39:
>> On 27/05/2020 16:49, Rhodri James wrote:
>>> On 27/05/2020 16:12, BlindAnagram wrote:
I'm sorry that you don't believe me but all I know is how I intend the
path to be used. And the os.path func
Roel Schroeven writes:
> Ben Bacarisse schreef op 27/05/2020 om 17:53:
>> There is well-known (*nix) software that relies on a/b/c/ meaning
>> something different to a/b/c but I don't know anyone who thinks this is
>> a good idea. It causes no end of confusion.
>
> rsync? I always have to look u
On Thu, May 28, 2020 at 6:14 AM Roel Schroeven wrote:
>
> Ben Bacarisse schreef op 27/05/2020 om 17:53:
> > There is well-known (*nix) software that relies on a/b/c/ meaning
> > something different to a/b/c but I don't know anyone who thinks this is
> > a good idea. It causes no end of confusion.
BlindAnagram writes:
> On 27/05/2020 16:53, Ben Bacarisse wrote:
>> As it should. Relying on a trailing \ having the right effect is
>> brittle to say the least.
>
> In my case less brittle than leaving it out.
Brittle does not mean broken. I know you can fix it by making sure the
trailing \
Ben Bacarisse schreef op 27/05/2020 om 17:53:
There is well-known (*nix) software that relies on a/b/c/ meaning
something different to a/b/c but I don't know anyone who thinks this is
a good idea. It causes no end of confusion.
rsync? I always have to look up whether or not I need to use a tra
BlindAnagram schreef op 27/05/2020 om 18:53:
Its not my bug to fix - the semantics of what I send is very clear on
any Windows system.
That's the first time I see any mention of those semantics, and I've
been using Windows since the Windows 3.1 days (and MS-DOS before that,
since 3.2 IIRC).
BlindAnagram schreef op 27/05/2020 om 18:39:
On 27/05/2020 16:49, Rhodri James wrote:
On 27/05/2020 16:12, BlindAnagram wrote:
I'm sorry that you don't believe me but all I know is how I intend the
path to be used. And the os.path functions aren't helpful here when
they actually_change_ the m
Dear all,
\On 26/05/2020 15:56, BlindAnagram wrote:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C:\\Documents'
and I use os.path.join() as follows:
join(base, '..\\..\\', 'build', '')
I obtain as expected from the d
I wasn’t going to say anything because I haven’t used MS Windows for years.
The OP wants to add a path separator at the end of a path. Why the OP wants to
do that doesn’t concern me.
OTOH, as others have already mentioned, the documentation explicitly says, "If
a component is an absolute path
On 27/05/2020 17:39, BlindAnagram wrote:
I believe by attempting to make the directory I send absolute with
abspath() and then copying a file to this path. They expected this to
copy the file into the directory with its original name but instead it
copies it to the file that abspath 'kindly' con
On 27/05/2020 16:53, Ben Bacarisse wrote:
> BlindAnagram writes:
>
>> On 27/05/2020 13:30, Ben Bacarisse wrote:
>>> BlindAnagram writes:
>>>
>>>> The issue that I raised here was whether the behaviour of os.path.join()
>>>> in treating th
On 27/05/2020 16:49, Rhodri James wrote:
> On 27/05/2020 16:12, BlindAnagram wrote:
>> I'm sorry that you don't believe me but all I know is how I intend the
>> path to be used. And the os.path functions aren't helpful here when
>> they actually_change_ the meanings of paths on Windows:
>>
f
BlindAnagram writes:
> On 27/05/2020 13:30, Ben Bacarisse wrote:
>> BlindAnagram writes:
>>
>>> The issue that I raised here was whether the behaviour of os.path.join()
>>> in treating the Windows directory separator '\\' as an absolute path
>>
On 27/05/2020 16:12, BlindAnagram wrote:
I'm sorry that you don't believe me but all I know is how I intend the
path to be used. And the os.path functions aren't helpful here when
they actually_change_ the meanings of paths on Windows:
fp= "C:\\Documents\finance\\"
abspath(fp)
'C:\\Documents
On 27/05/2020 14:53, Rhodri James wrote:
> On 27/05/2020 14:41, BlindAnagram wrote:
>> That is true if you know for sure how your path will be used.
>>
>> But if you don't, there is a world of difference between passing the
>> paths 'name' and 'name\\' on for others to use. And in this situation it
On 27/05/2020 14:41, BlindAnagram wrote:
That is true if you know for sure how your path will be used.
But if you don't, there is a world of difference between passing the
paths 'name' and 'name\\' on for others to use. And in this situation it
doesn't help when os.path functions strip the direc
On 27/05/2020 13:30, Ben Bacarisse wrote:
> BlindAnagram writes:
>
>> The issue that I raised here was whether the behaviour of os.path.join()
>> in treating the Windows directory separator '\\' as an absolute path
>> should be considered a bug.
>
> Y
BlindAnagram writes:
> The issue that I raised here was whether the behaviour of os.path.join()
> in treating the Windows directory separator '\\' as an absolute path
> should be considered a bug.
You think it should be considered to be a relative path? The only
meaning
; |>>> import pathlib
>>> |>>> import os
>>> |>>> pathlib.PureWindowsPath('\\').is_absolute()
>>> |False
>>> |>>> pathlib.PureWindowsPath(os.sep).is_absolute()
>>> |False
>>> |>>> pathlib
On Wed, May 27, 2020 at 6:50 PM Barry Scott wrote:
>
>
>
> > On 26 May 2020, at 18:01, BlindAnagram wrote:
> >
> > On 26/05/2020 17:09, Stefan Ram wrote:
> >> Mats Wichmann writes:
> >>> an absolute path is one that starts with the pathname separator.
> >>
> >> The Python Library Reference does
> On 26 May 2020, at 18:01, BlindAnagram wrote:
>
> On 26/05/2020 17:09, Stefan Ram wrote:
>> Mats Wichmann writes:
>>> an absolute path is one that starts with the pathname separator.
>>
>> The Python Library Reference does not use the term
>> "pathname separator". It uses "directory sepa
> On 26 May 2020, at 17:46, MRAB wrote:
>
> On 2020-05-26 16:48, BlindAnagram wrote:
>> On 26/05/2020 16:22, Ben Bacarisse wrote:
>>> BlindAnagram writes:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C
On 2020-05-26, Dennis Lee Bieber 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 (wheth
On 27/05/20 5:23 AM, BlindAnagram wrote:
On 26/05/2020 16:59, Mats Wichmann wrote:
On 5/26/20 8:56 AM, BlindAnagram wrote:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C:\\Documents'
and I use os.path.join() as follows:
On 2020-05-26 16:52, Dennis Lee Bieber wrote:
On Tue, 26 May 2020 16:22:27 +0100, Ben Bacarisse
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.
Th
On 26/05/2020 18:51, Mats Wichmann wrote:
> On 5/26/20 10:57 AM, BlindAnagram wrote:
>> On 26/05/2020 16:59, Mats Wichmann wrote:
>>> On 5/26/20 8:56 AM, BlindAnagram wrote:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
>
On 5/26/20 10:57 AM, BlindAnagram wrote:
> On 26/05/2020 16:59, Mats Wichmann wrote:
>> On 5/26/20 8:56 AM, BlindAnagram wrote:
>>> I came across an issue that I am wondering whether I should report as an
>>> issue. If I have a directory, say:
>>>
>>> base='C:\\Documents'
>>>
>>> and I use os.pa
On 26/05/2020 16:59, Mats Wichmann wrote:
> On 5/26/20 8:56 AM, BlindAnagram wrote:
>> I came across an issue that I am wondering whether I should report as an
>> issue. If I have a directory, say:
>>
>> base='C:\\Documents'
>>
>> and I use os.path.join() as follows:
>>
>> join(base, '..\\..\\
On 26/05/2020 18:07, BlindAnagram wrote:
On 26/05/2020 17:46, MRAB wrote:
On 2020-05-26 16:48, BlindAnagram wrote:
On 26/05/2020 16:22, Ben Bacarisse wrote:
BlindAnagram writes:
I came across an issue that I am wondering whether I should report
as an
issue. If I have a directory, say:
On 26/05/2020 18:01, BlindAnagram wrote:
On 26/05/2020 17:09, Stefan Ram wrote:
Mats Wichmann writes:
an absolute path is one that starts with the pathname separator.
The Python Library Reference does not use the term
"pathname separator". It uses "directory separator"
(os.sep) and
On 26/05/2020 17:46, MRAB wrote:
> On 2020-05-26 16:48, BlindAnagram wrote:
>> On 26/05/2020 16:22, Ben Bacarisse wrote:
>>> BlindAnagram writes:
>>>
I came across an issue that I am wondering whether I should report
as an
issue. If I have a directory, say:
base='C:\\Do
On 26/05/2020 17:09, Stefan Ram wrote:
> Mats Wichmann writes:
>> an absolute path is one that starts with the pathname separator.
>
> The Python Library Reference does not use the term
> "pathname separator". It uses "directory separator"
> (os.sep) and "filename separator" ('/' on Unix).
On 26/05/2020 16:59, Mats Wichmann wrote:
> On 5/26/20 8:56 AM, BlindAnagram wrote:
>> I came across an issue that I am wondering whether I should report as an
>> issue. If I have a directory, say:
>>
>> base='C:\\Documents'
>>
>> and I use os.path.join() as follows:
>>
>> join(base, '..\\..\\
On 2020-05-26 16:48, BlindAnagram wrote:
On 26/05/2020 16:22, Ben Bacarisse wrote:
BlindAnagram writes:
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C:\\Documents'
and I use os.path.join() as follows:
join(base, '..\
On 5/26/20 8:56 AM, BlindAnagram wrote:
> I came across an issue that I am wondering whether I should report as an
> issue. If I have a directory, say:
>
> base='C:\\Documents'
>
> and I use os.path.join() as follows:
>
> join(base, '..\\..\\', 'build', '')
>
> I obtain as expected from th
On 26/05/2020 16:25, Stefan Ram wrote:
> BlindAnagram writes:
>> The documentation says that an absolute path in the parameter list for
>> join will discard all previous parameters but '\\' is not an absoute path!
>
> The source code for "join" in "ntpath.py" does not seem to
> bother to call
On 26/05/2020 16:22, Ben Bacarisse wrote:
> BlindAnagram writes:
>
>> I came across an issue that I am wondering whether I should report as an
>> issue. If I have a directory, say:
>>
>> base='C:\\Documents'
>>
>> and I use os.path.join() as follows:
>>
>> join(base, '..\\..\\', 'build', '')
BlindAnagram writes:
> I came across an issue that I am wondering whether I should report as an
> issue. If I have a directory, say:
>
> base='C:\\Documents'
>
> and I use os.path.join() as follows:
>
> join(base, '..\\..\\', 'build', '')
It rather defeats the purpose of os.sep if you inclu
I came across an issue that I am wondering whether I should report as an
issue. If I have a directory, say:
base='C:\\Documents'
and I use os.path.join() as follows:
join(base, '..\\..\\', 'build', '')
I obtain as expected from the documentation:
'C:\\Documents\\..\\..\\build\\'
But if I
55 matches
Mail list logo