cm0002@lemmy.world to Programmer Humor@programming.dev · 2 years agoSpecifying file pathslemmy.mlexternal-linkmessage-square130linkfedilinkarrow-up11.47Karrow-down115cross-posted to: [email protected][email protected]
arrow-up11.46Karrow-down1external-linkSpecifying file pathslemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 years agomessage-square130linkfedilinkcross-posted to: [email protected][email protected]
minus-squareNicht BurningTurtle@feddit.orglinkfedilinkarrow-up105·2 years agoI hate that I need to use escape characters when creating something for windows.
minus-squarePennomi@lemmy.worldlinkfedilinkEnglisharrow-up31arrow-down2·edit-21 month agodeleted by creator
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up19arrow-down1·2 years agoNobody is stopping you from using forward slashes. Python will translate the path for the current platform.
minus-squareLichtblitz@discuss.tchncs.delinkfedilinkarrow-up5·2 years agoPython doesn’t have to. Windows supports both out of the box. Has been for many, many years
minus-squareDiplomjodler@lemmy.worldlinkfedilinkarrow-up17·2 years agoTry pathlib. All your problems solved.
I hate that I need to use escape characters when creating something for windows.
deleted by creator
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!
Try pathlib. All your problems solved.