-
Notifications
You must be signed in to change notification settings - Fork 108
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
Pythonize pbench-log-timestamp #2027
Pythonize pbench-log-timestamp #2027
Conversation
Replace shell script with python script and add unit test. Signed-off-by: Charles Short <[email protected]>
@zulcss did you mean to close this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to work with streams of data from a PIPE, and also needs a rebase.
@click.command() | ||
def main(): | ||
""" Add timestamp to user input""" | ||
stdin = click.get_text_stream("stdin").read() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be a generator so that stdin
can be a pipe and each line read from the pipe is timestamped and written out.
Further, I think we'll want to make sure it is not using buffered I/O so that folks can inspect the output easily as it is generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll own driving this change into the repository. |
At this point, I think it's safe to say that this PR will never be merged. |
Replace shell script with python script and add unit test.
Signed-off-by: Charles Short [email protected]