Brand new member and brand new to Python here. I've been trying to learn python by deconstructing python code and for the most part I'm doing alright. I came across a problem which I'm hoping has an easy solution....at least for those of you in the know.

I'm sourcing files right now that I'd like to be able to toggle between mapped drive letter and unc path through the help of python code. I'm using the os.path.splitdrive() and os.path.splitunc() functions to help me achieve this. The splitdrive function was straightforward. I'm having a bit of trouble with splitunc and I can't seem to find out how to do the following:

Split the pathname path into a pair (unc, rest) so that unc is the UNC mount point (such as r'\\host\mount'), if present, and rest the rest of the path (such as r'\path\file.ext'). For paths containing drive letters, unc will always be the empty string.