cm0002@lemmy.world to Programmer Humor@programming.dev · 12 hours agoSpecifying file pathslemmy.mlimagemessage-square69fedilinkarrow-up1845arrow-down16cross-posted to: linuxmemes@lemmy.world
arrow-up1839arrow-down1imageSpecifying file pathslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 12 hours agomessage-square69fedilinkcross-posted to: linuxmemes@lemmy.world
minus-squarePennomi@lemmy.worldlinkfedilinkEnglisharrow-up21·11 hours agoPython raw strings to the rescue!
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up15·10 hours agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-squareLichtblitz@discuss.tchncs.delinkfedilinkarrow-up1·3 hours 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!