cm0002@lemmy.world to Programmer Humor@programming.dev · 1 month agoSpecifying file pathslemmy.mlimagemessage-square132fedilinkarrow-up11.47Karrow-down114cross-posted to: programmerhumor@lemmy.ml
arrow-up11.46Karrow-down1imageSpecifying file pathslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 month agomessage-square132fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarePennomi@lemmy.worldlinkfedilinkEnglisharrow-up31arrow-down2·1 month agoPython raw strings to the rescue!
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up19arrow-down1·1 month agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-squareLichtblitz@discuss.tchncs.delinkfedilinkarrow-up5·1 month 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!