Issue34186
Created on 2018-07-22 02:36 by coleman45.1@hotmail.com, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Screen Shot 2018-07-21 at 9.29.59 PM.png | coleman45.1@hotmail.com, 2018-07-22 02:36 | Screenshot dispalying the issue | ||
| Messages (3) | |||
|---|---|---|---|
| msg322128 - (view) | Author: Todd (coleman45.1@hotmail.com) | Date: 2018-07-22 02:36 | |
Short back story - I am organizing music where "/" appears in a lot a metadata for the songs. For instance, the artist "AC/DC" or "ACDC w/ Axl Rose". On macOS, it is acceptable to name a folder "AC/DC" while the slash would cause an issue in Windows. Issue - While using os.listdir to list a number of artist folders inside my iTunes music folder os.listdir replaced "/" with ":" IF the "/" appears in the name itself. It does not replace the slash delimiters. I have included a screen shot. On the right side of the image is an example directory I made with a few folders. Two of the folders have "/" in their names. On the left side of the image is the Python shell showing the use of os.listdir along with the output. You'll notice that the listed directories don't include "/", but instead include ":". |
|||
| msg322130 - (view) | Author: Zachary Ware (zach.ware) * ![]() |
Date: 2018-07-22 03:10 | |
That's nothing to do with Python and everything to do with macOS. As a test, open Terminal, do `ls ~/Example`, and you'll see `AC:DC` instead of `AC/DC`. As a further test, do `mkdir ~/Example/dir:with:colons` and then have a look in Finder. See here [1] for more information. [1] https://apple.stackexchange.com/questions/173529/when-did-the-colon-character-become-an-allowed-character-in-the-filesystem |
|||
| msg322145 - (view) | Author: Todd (coleman45.1@hotmail.com) | Date: 2018-07-22 13:57 | |
Ah, thank you for the link. I looked for something like that, but I obviously didn’t use the right wording while searching. Sorry for the false report and thanks for the quick help. -Todd Sent from my iPhone > On Jul 21, 2018, at 10:10 PM, Zachary Ware <report@bugs.python.org> wrote: > > > Zachary Ware <zachary.ware@gmail.com> added the comment: > > That's nothing to do with Python and everything to do with macOS. As a test, open Terminal, do `ls ~/Example`, and you'll see `AC:DC` instead of `AC/DC`. As a further test, do `mkdir ~/Example/dir:with:colons` and then have a look in Finder. > > See here [1] for more information. > > [1] https://apple.stackexchange.com/questions/173529/when-did-the-colon-character-become-an-allowed-character-in-the-filesystem > > ---------- > nosy: +zach.ware > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker <report@bugs.python.org> > <https://bugs.python.org/issue34186> > _______________________________________ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:03 | admin | set | github: 78367 |
| 2018-07-22 13:57:13 | coleman45.1@hotmail.com | set | messages: + msg322145 |
| 2018-07-22 03:10:33 | zach.ware | set | status: open -> closed nosy:
+ zach.ware resolution: not a bug |
| 2018-07-22 02:36:57 | coleman45.1@hotmail.com | create | |
