xdufacool/score_helper.py
def fill(forms, score, field, **kwargs):
    """Fill forms for uploading to Xidian."""
    scores = load_xls(score)
    fields = [kwargs["sid_xdu"], field]
    sid_col, score_col = find_column_index(scores[0], fields)
    scores_dict = value_dict(scores, sid_col, score_col)

    for xlsfile in forms:
        score_form = load_xls(xlsfile)        
        sid_col, = find_column_index(score_form[0], [kwargs["sid_xdu"]])
        fill_score_form(score_form, scores_dict, sid_col)
        write_xls(score_form, xlsfile)
Fill forms for uploading to Xidian.
Fill forms for uploading to Xidian.
Fill forms for uploading to Xidian .
def fill(forms, score, field, **kwargs):
    scores = load_xls(score)
    fields = [kwargs["sid_xdu"], field]
    sid_col, score_col = find_column_index(scores[0], fields)
    scores_dict = value_dict(scores, sid_col, score_col)
    for xlsfile in forms:
        score_form = load_xls(xlsfile)        
        sid_col, = find_column_index(score_form[0], [kwargs["sid_xdu"]])
        fill_score_form(score_form, scores_dict, sid_col)
        write_xls(score_form, xlsfile)
def fill ( forms , score , field , ** kwargs ) : scores = load_xls ( score ) fields = [ kwargs [ "sid_xdu" ] , field ] sid_col , score_col = find_column_index ( scores [ 0 ] , fields ) scores_dict = value_dict ( scores , sid_col , score_col ) for xlsfile in forms : score_form = load_xls ( xlsfile ) sid_col , = find_column_index ( score_form [ 0 ] , [ kwargs [ "sid_xdu" ] ] ) fill_score_form ( score_form , scores_dict , sid_col ) write_xls ( score_form , xlsfile )
Fill forms for uploading to Xidian.
Fill forms for uploading to Xidian .
"""Fill forms for uploading to Xidian."""
forms
score
field