cm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agoSpecifying file pathslemmy.mlimagemessage-square99fedilinkarrow-up11.26Kcross-posted to: [email protected][email protected]
arrow-up11.26KimageSpecifying file pathslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agomessage-square99fedilinkcross-posted to: [email protected][email protected]
minus-squarePennomi@lemmy.worldlinkfedilinkEnglisharrow-up29·1 day agoPython raw strings to the rescue!
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up17·1 day agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-squareLichtblitz@discuss.tchncs.delinkfedilinkarrow-up3·1 day 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!