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

ENH,UBY: pyline.main(output=None) #26

Open
3 tasks
westurner opened this issue Jun 19, 2016 · 0 comments
Open
3 tasks

ENH,UBY: pyline.main(output=None) #26

westurner opened this issue Jun 19, 2016 · 0 comments
Assignees

Comments

@westurner
Copy link
Owner

westurner commented Jun 19, 2016

When working with the pyline.pyline.main() function, it's often not necessary to print the results (e.g. when they're appended to to results and the utilized in a downstream function);
there should be a way to not write to stdout or stderr (or a stringio.StringIO (Python 2), io.StringIO).

solution:

With NotImplemented as a default value

  • def pyline(output=NotImplemented)
  • if not output:
    • don't write sys.stdout
  • elif output is NotImplemented:
    • write to sys.stdout (by default)

workaround:

  • output=sys.stderr
  • output=io.StringIO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant