When using python if you have say:
dd="~/this/path/do/exist/"
and you do
os.listdir(dd)
you get
FileNotFoundError: [Errno2] no such file or directory '~/this/path/do/exist/'
even though the path exists.
Why is this and how can it be corrected?
Furthermore if you pass a path with ~ using argparse it gets converted to a full path and this problem does not occur.