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

use TextIOWrapper when communicating with pandoc subprocess #4205

Merged
merged 3 commits into from Sep 14, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 13, 2013

uses 'universal-newline' mode, to avoid any confusion with CRLF.

closes #4122
closes #3819

alternative to #4202

uses 'universal-newline' mode, to avoid confusion with CRLF.

closes ipython#4122
@takluyver
Copy link
Member

The alternative would be to splitlines() and rejoin using \n. I'm not sure which is more efficient here.

@minrk
Copy link
Member Author

minrk commented Sep 13, 2013

That sounds like a job for %timeit!

@jdfreder
Copy link
Member

@minrk this fixes #4122 in my test notebook too! Awesome 👍

@minrk
Copy link
Member Author

minrk commented Sep 13, 2013

TextIOWrapper is about 2-5x as fast as split/rejoin (not that this is ever an expensive operation), so I'll stick with the current implementation.

@takluyver
Copy link
Member

Great, my tests showed a smaller difference in the same direction.

@minrk
Copy link
Member Author

minrk commented Sep 14, 2013

Adding a test before merging.

@minrk
Copy link
Member Author

minrk commented Sep 14, 2013

test added and passed on OS X and Windows 7, just waiting on Travis.

@takluyver
Copy link
Member

Travis is happy as well. Merging.

takluyver added a commit that referenced this pull request Sep 14, 2013
use TextIOWrapper when communicating with pandoc subprocess
@takluyver takluyver merged commit a6224f2 into ipython:master Sep 14, 2013
@minrk minrk deleted the universal-newline-pandoc branch September 14, 2013 02:38
minrk added a commit that referenced this pull request Dec 24, 2013
…ubprocess

uses 'universal-newline' mode, to avoid any confusion with CRLF.

closes #4122
closes #3819

alternative to #4202
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
use TextIOWrapper when communicating with pandoc subprocess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants