[Tutor] OS lib creating an directory using an absolute path.
Mats Wichmann
mats at wichmann.us
Sat Feb 6 19:13:48 EST 2021
On 2/6/21 5:03 PM, Alan Gauld via Tutor wrote:
> On 06/02/2021 23:38, boB Stepp wrote:
>> On Sat, Feb 06, 2021 at 03:49:37AM -0700, Mats Wichmann wrote:
>>
>>> and would really suggest you not use directory names with spaces in
>>> them, it will eventually bring you grief.
>>
>> Out of habit from looong ago when spaces were not allowed at all, I tend
>> not to use spaces in directory/folder names. But don't all modern
>> operating systems now allow spaces in their directory names? What would be
>> the potential sources of grief in modern times?
>
> Speaking personally I find filenames/folders with spaces continually
> trip me up, especially in shell scripts and programs. You need to
> remember to always add quotes and escape sequences and be careful
> about splitting paths etc etc.
>
> If you only manage files via a GUI then it may work OK but any time
> you have to type filenames or paths spaces introduce extra complexity.
Right. And why buy extra complexity? There are lots of cases where you
build command lines, or process pathnames, and those - even on Windows
shells - are universally split by Whitespace. We're talking about
working with Python, not a gui, so... _of course_ it's possible to make
things work with filenames that have spaces in them, but it's just one
extra thing to keep track of when there are so many other things to keep
track of.
More information about the Tutor
mailing list