Return the absolute version of a path.
(path)
| 515 | |
| 516 | except ImportError: # not running on Windows - mock up something sensible |
| 517 | def abspath(path): |
| 518 | """Return the absolute version of a path.""" |
| 519 | path = os.fspath(path) |
| 520 | if not isabs(path): |
| 521 | if isinstance(path, bytes): |
| 522 | cwd = os.getcwdb() |
| 523 | else: |
| 524 | cwd = os.getcwd() |
| 525 | path = join(cwd, path) |
| 526 | return normpath(path) |
| 527 | |
| 528 | else: # use native Windows method on Windows |
| 529 | def abspath(path): |
searching dependent graphs…