Debian Codegraph @

fvwm/scripts/FvwmMPD/getprevdir.py

raw
1 #!/usr/bin/env python2
2 # Return the path to the previous mpd library directory
3 import sys
4
5 if __name__ == "__main__":
6 if (sys.argv[1].rfind('/') == -1):
7 #No slashes probably means we're one down from the mpd root
8 print "''"
9 else:
10 print sys.argv[1][:sys.argv[1].rfind('/')]