@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months agoSpecifying file pathslemmy.mlimagemessage-square131fedilinkarrow-up11.47Karrow-down112cross-posted to: programmerhumor@lemmy.ml
arrow-up11.46Karrow-down1imageSpecifying file pathslemmy.ml@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months agomessage-square131fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareunalivejoylinkfedilinkEnglish18•2 months agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-square@Lichtblitz@discuss.tchncs.delinkfedilink5•2 months agoPython doesn’t have to. Windows supports both out of the box. Has been for many, many years
Python raw strings to the rescue!
Pathlib is the answer.
Nobody is stopping you from using forward slashes. Python will translate the path for the current platform.
Python doesn’t have to. Windows supports both out of the box. Has been for many, many years
Good to know!