Guest User

Untitled

a guest
May 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. def do_widgets(ws, col0, col1):
  2. """ Process each widget. """
  3. NO_WDGTS = 5
  4. ENABLE_START_ROW = 6
  5. ENABLE_END_ROW = ENABLE_START_ROW + NO_WDGTS - 1
  6. WDGT_START_ROW = 1
  7. WDGT_END_ROW = WDGT_START_ROW + NO_WDGTS - 1
  8.  
  9. wdgts = [cell[1] for cell in zip([cell.value for col
  10. in ws.iter_cols(min_row=ENABLE_START_ROW, min_col=col0,
  11. max_row=ENABLE_END_ROW, max_col=col0)
  12. for cell in col],
  13. [cell.value for col
  14. in ws.iter_cols(min_row=WDGT_START_ROW, min_col=col1,
  15. max_row=WDGT_END_ROW, max_col=col1)
  16. for cell in col]) if cell[0]]
  17. # Use list of enabled widgets
  18. print(wdgts)
  19.  
  20. Check results
  21. =============
  22.  
  23. E128:10:22:continuation line under-indented for visual indent
  24. E128:14:22:continuation line under-indented for visual indent
  25. E128:16:22:continuation line under-indented for visual indent
Add Comment
Please, Sign In to add comment