fdutils/files.py
def _get_filename_index_value(file_path):
    """ stamp a filename with an added indexed incremented to what it had before

    """
    file_idx_re = re.compile(r'^(?P<name>.+?)_(?P<idx>\d+)$')
    name, ext = os.path.splitext(file_path)
    m = file_idx_re.match(name)
    if m:
        return int(m.group('idx'))
    else:
        return -1
 stamp a filename with an added indexed incremented to what it had before

    
stamp a filename with an added indexed incremented to what it had before
stamp a filename with an added indexed incremented to what it had before
def _get_filename_index_value(file_path):
    file_idx_re = re.compile(r'^(?P<name>.+?)_(?P<idx>\d+)$')
    name, ext = os.path.splitext(file_path)
    m = file_idx_re.match(name)
    if m:
        return int(m.group('idx'))
    else:
        return -1
def _get_filename_index_value ( file_path ) : file_idx_re = re . compile ( r'^(?P<name>.+?)_(?P<idx>\d+)$' ) name , ext = os . path . splitext ( file_path ) m = file_idx_re . match ( name ) if m : return int ( m . group ( 'idx' ) ) else : return - 1
stamp a filename with an added indexed incremented to what it had before
stamp a filename with an added indexed incremented to what it had before
""" stamp a filename with an added indexed incremented to what it had before

    """
file_path