This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Andrea Moro
Recipients Andrea Moro
Date 2019-06-12.16:49:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org>
In-reply-to
Content
Assuming the given path contains a '~' character, it would be nice to have a function to expand the given path so any further calls to an .exists doesn't fail.

A prototype of the function could be

        # Expand the home path in *ix based systems if any
        if '~' in s:
            x = [x for x in Path(s).parts if x not in '~']
            p = Path.home()
            for item in x:
                p = p.joinpath(item)
History
Date User Action Args
2019-06-12 16:49:14Andrea Morosetrecipients: + Andrea Moro
2019-06-12 16:49:14Andrea Morosetmessageid: <1560358154.87.0.642844029976.issue37255@roundup.psfhosted.org>
2019-06-12 16:49:14Andrea Morolinkissue37255 messages
2019-06-12 16:49:14Andrea Morocreate