turntable/utils.py
def path_to_filename(pathfile):
    '''
    Takes a path filename string and returns the split between the path and the filename

    if filename is not given, filename = ''
    if path is not given, path = './'

    '''

    path = pathfile[:pathfile.rfind('/') + 1]
    if path == '':
        path = './'

    filename = pathfile[pathfile.rfind('/') + 1:len(pathfile)]
    if '.' not in filename:
        path = pathfile
        filename = ''

    if (filename == '') and (path[len(path) - 1] != '/'):
        path += '/'

    return path, filename
def path_to_filename(pathfile):
    '''
    Takes a path filename string and returns the split between the path and the filename

    if filename is not given, filename = ''
    if path is not given, path = './'

    '''

    path = pathfile[:pathfile.rfind('/') + 1]
    if path == '':
        path = './'

    filename = pathfile[pathfile.rfind('/') + 1:len(pathfile)]
    if '.' not in filename:
        path = pathfile
        filename = ''

    if (filename == '') and (path[len(path) - 1] != '/'):
        path += '/'

    return path, filename
Takes a path filename string and returns the split between the path and the filename

    if filename is not given, filename = ''
    if path is not given, path = './'