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

keep_false skips blank lines #26

Open
GoogleCodeExporter opened this issue Nov 22, 2015 · 2 comments
Open

keep_false skips blank lines #26

GoogleCodeExporter opened this issue Nov 22, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. echo -e "1\n\n3" | pyp -k 'p'
2. observe the output

What is the expected output? What do you see instead?
expected: 1\n\n3\n
observed: 1\n3\n


What version of the product are you using? On what operating system?
version 2.13


Please provide any additional information below.
possible fix, change line 1463 to
    pipe_input = [x.rstrip() for x in sys.stdin.readlines() if options.keep_false or x.strip()]

Original issue reported on code.google.com by coli...@gmail.com on 12 Sep 2014 at 4:36

Attachments:

@GoogleCodeExporter
Copy link
Author

cool, we'll try to implement this for the next release.  Thanks for including a 
fix!

Original comment by tobyro...@gmail.com on 12 Sep 2014 at 4:47

@GoogleCodeExporter
Copy link
Author

hi, i was just reviewing this...the -k is used for boolean tests to make sure 
lists have the same number of lines.  I think you are looking for the -i option 
which ignores blank lines.

thanks,

Toby

Original comment by tobyro...@gmail.com on 7 Feb 2015 at 12:29

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