File: relative.py

package info (click to toggle)
lilypond 2.24.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 70,352 kB
  • sloc: cpp: 87,962; lisp: 43,344; xml: 31,269; python: 22,974; sh: 4,090; yacc: 4,080; perl: 2,873; lex: 1,387; makefile: 76
file content (8 lines) | stat: -rw-r--r-- 210 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
# Make a path relative to the current working directory. Equivalent to
# realpath --relative-to=. except that realpath isn't available on
# macOS/BSD.

import os
import sys

print(os.path.relpath(sys.argv[1]))