cm0002@lemmy.world to Programmer Humor@programming.dev · 10 hours agoSpecifying file pathslemmy.mlimagemessage-square65fedilinkarrow-up1747arrow-down16cross-posted to: linuxmemes@lemmy.worldprogrammerhumor@lemmy.ml
arrow-up1741arrow-down1imageSpecifying file pathslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 10 hours agomessage-square65fedilinkcross-posted to: linuxmemes@lemmy.worldprogrammerhumor@lemmy.ml
minus-squarePennomi@lemmy.worldlinkfedilinkEnglisharrow-up20·9 hours agoPython raw strings to the rescue!
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up15·8 hours agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-squareLichtblitz@discuss.tchncs.delinkfedilinkarrow-up1·31 minutes 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!