Skip to content

Commit

Permalink
Add part on custom widget usage to tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
DasIch committed Mar 12, 2011
1 parent d8e5b61 commit 70c2e33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/guides/widgets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,12 @@ So all in all our result looks like this::
return self.text

update = init

In order to use the widget you have to pass it to
:meth:`brownie.terminal.TerminalWriter.progress`::

yourwidgets = {'yourwidget': TextWidget}

with writer.progress('$yourwidget', widgets=yourwidgets) as bar:
# do something with progressbar ('bar')
pass

0 comments on commit 70c2e33

Please sign in to comment.