Follow on from #6663
We avoid direct path catination, e.g:
path = '/bin/' + app + 'launch'
Partly because it's messy, partly because it's easy to get wrong, partly because / is only a convention (see os.sep).
To avoid this fuss, Python provides some functions that do this for you, e.g:
from pathlib import Path
path = Path('bin', app, 'launch')
Let pathlib do the mangling for us.
Follow on from #6663
We avoid direct path catination, e.g:
Partly because it's messy, partly because it's easy to get wrong, partly because
/is only a convention (seeos.sep).To avoid this fuss, Python provides some functions that do this for you, e.g:
Let
pathlibdo the mangling for us.