diff -r 1273cd92a8f4 -r 9b01b4004314 Utilities/__init__.py --- a/Utilities/__init__.py Tue Apr 18 19:22:54 2017 +0200 +++ b/Utilities/__init__.py Wed Apr 19 19:02:34 2017 +0200 @@ -1037,6 +1037,24 @@ @return flag indicating executable status (boolean) """ return os.access(exe, os.X_OK) + + +def isDrive(path): + """ + Function to check, if a path is a Windows drive. + + @param path path name to be checked + @type str + @return flag indicating a Windows drive + @rtype bool + """ + isDrive = False + drive, directory = os.path.splitdrive(path) + if drive and len(drive) == 2 and drive.endswith(":") and \ + directory in ["", "\\", "/"]: + isDrive = True + + return isDrive def samepath(f1, f2):