Saving non-ascii history #1377

Merged
merged 3 commits into from Feb 18, 2012

Conversation

Projects
None yet
3 participants
@takluyver
Member

takluyver commented Feb 4, 2012

Non ascii history caused problems for the %hist command with the -f option to save to file (#1375). This adds a test and fixes it.

@c000de

This comment has been minimized.

Show comment
Hide comment
@c000de

c000de Feb 6, 2012

So io.open has an encoding parameter, learned a new thing today :) Nice fix! Better/neater than the solution I had in mind too.

c000de commented on a66f7c9 Feb 6, 2012

So io.open has an encoding parameter, learned a new thing today :) Nice fix! Better/neater than the solution I had in mind too.

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 6, 2012

Owner

Yep, I discovered io.open recently - it's essentially the open() function from Python 3, available in Python 2.6 and above.

Owner

takluyver replied Feb 6, 2012

Yep, I discovered io.open recently - it's essentially the open() function from Python 3, available in Python 2.6 and above.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Feb 11, 2012

Member

Seems like we want to be using io.open everywhere, is this true? Can you perhaps write up a simple policy note on that, either in dev docs, or your py3/unicode wiki page?

Member

minrk commented Feb 11, 2012

Seems like we want to be using io.open everywhere, is this true? Can you perhaps write up a simple policy note on that, either in dev docs, or your py3/unicode wiki page?

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 11, 2012

Member

Yes, I expect it will be useful. I'll put it on the wiki page.

Member

takluyver commented Feb 11, 2012

Yes, I expect it will be useful. I'll put it on the wiki page.

minrk added a commit that referenced this pull request Feb 18, 2012

Merge pull request #1377 from takluyver/i1375
Non ascii history caused problems for the %hist command with the -f option to save to file. This adds a test and fixes it using io.open.

closes #1375

@minrk minrk merged commit fd42bee into ipython:master Feb 18, 2012

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #1377 from takluyver/i1375
Non ascii history caused problems for the %hist command with the -f option to save to file. This adds a test and fixes it using io.open.

closes #1375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment