def resolve_shortcut(path): if os.name == 'nt': sc = Shortcut() sc.load(path) return sc.GetPath(0)[0] else: # boy, I don't know return path