Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def do_widgets(ws, col0, col1):
- """ Process each widget. """
- NO_WDGTS = 5
- ENABLE_START_ROW = 6
- ENABLE_END_ROW = ENABLE_START_ROW + NO_WDGTS - 1
- WDGT_START_ROW = 1
- WDGT_END_ROW = WDGT_START_ROW + NO_WDGTS - 1
- wdgts = [cell[1] for cell in zip([cell.value for col
- in ws.iter_cols(min_row=ENABLE_START_ROW, min_col=col0,
- max_row=ENABLE_END_ROW, max_col=col0)
- for cell in col],
- [cell.value for col
- in ws.iter_cols(min_row=WDGT_START_ROW, min_col=col1,
- max_row=WDGT_END_ROW, max_col=col1)
- for cell in col]) if cell[0]]
- # Use list of enabled widgets
- print(wdgts)
- Check results
- =============
- E128:10:22:continuation line under-indented for visual indent
- E128:14:22:continuation line under-indented for visual indent
- E128:16:22:continuation line under-indented for visual indent
Add Comment
Please, Sign In to add comment