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

Extraneous LF when stdout output #84

Closed
kernc opened this issue Sep 18, 2018 · 2 comments
Closed

Extraneous LF when stdout output #84

kernc opened this issue Sep 18, 2018 · 2 comments

Comments

@kernc
Copy link
Contributor

kernc commented Sep 18, 2018

Any notebook; the following commands:

$ jupytext --to py example.ipynb
$ diff example.py <(jupytext --to py -o- example.ipynb)
28a29
> 

diff exits non-cleanly as -o- adds an additional newline. I believe end='' or sys.stdout.write()* here might fix it.

print(writes(notebook, ext=ext))


* Print function won't work without importing from __future__.

@kernc
Copy link
Contributor Author

kernc commented Sep 18, 2018

Also this line in tests! 😆

compare(out[:-1], pynb)

@mwouts
Copy link
Owner

mwouts commented Sep 19, 2018

Thanks @kernc for the pull request, it is certainly better without the new line!

@mwouts mwouts mentioned this issue Sep 23, 2018
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

No branches or pull requests

2 participants