Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable output #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yoursvivek
Copy link

adding ability to configure output and write bar information on stderr rather than stdout

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d4a031d on yoursvivek:configurable_output into e8ef75b on lukaszb:master.

@@ -16,7 +16,8 @@ class Bar(object):

DEFAULT_WIDGETS = [BarWidget, ProgressWidget, TimerWidget, EtaWidget]

def __init__(self, iterable, steps=None, step_callback=None, widgets=None):
def __init__(self, iterable, steps=None, step_callback=None, widgets=None,
output=sys.stderr):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a breaking change (it was sys.stdout previously)

@lukaszb
Copy link
Owner

lukaszb commented Jan 23, 2015

Looks good apart from changing stdout -> stderr.

@yoursvivek
Copy link
Author

Yes, the change [stdout -> stderr] was purposefully done in spirit same as many of core utils which helps writing scripts where result can be piped with lesser keystrokes.

I'm happy either way, as long as it's configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants