Skip to content

Instantly share code, notes, and snippets.

@mikemccracken
Created July 15, 2016 20:34
Show Gist options
  • Save mikemccracken/84cbb2f50d7e1230b0e08ef36101729d to your computer and use it in GitHub Desktop.
Save mikemccracken/84cbb2f50d7e1230b0e08ef36101729d to your computer and use it in GitHub Desktop.
self.step_pile = Pile([
Padding.center_90(HR()),
Padding.line_break(""),
Padding.center_90(Pile(self.steps)),
Padding.line_break(""),
Padding.center_20(self.buttons())
])
#becomes
self.step_pile = Pile([
Padding.center_90(HR()),
Padding.line_break("")] +
[Padding.center_90(s) for s in self.steps] +
[Padding.line_break(""),
Padding.center_20(self.buttons())
])
@mikemccracken
Copy link
Author

def get_step_widget(index):
   return self.step_pile[index + 2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment