@cm0002 to Programmer [email protected] • 12 hours agoSpecifying file pathslemmy.mlimagemessage-square68arrow-up1847arrow-down16cross-posted to: linuxmemes
arrow-up1841arrow-down1imageSpecifying file pathslemmy.ml@cm0002 to Programmer [email protected] • 12 hours agomessage-square68cross-posted to: linuxmemes
minus-squareNicht BurningTurtlelinkfedilink74•12 hours agoI hate that I need to use escape characters when creating something for windows.
minus-squareunalivejoylinkfedilinkEnglish14•11 hours agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-square@[email protected]linkfedilink1•3 hours agoPython doesn’t have to. Windows supports both out of the box. Has been for many, many years
I hate that I need to use escape characters when creating something for windows.
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
Try pathlib. All your problems solved.