Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ipython3 set_next_input() failure #1051

Closed
hpaulj opened this Issue · 1 comment

2 participants

Paul Jacobson Thomas Kluyver
Paul Jacobson

IPython0.11, running under Python 3.2.2

magic_rep and magic_loadpy do not set the next input as expected under Python2

The problem is in core/interactiveshell.py set_next_input(self, s) where:

if isinstance(s, str):
s = s.encode(self.stdin_encoding, 'replace')

works fine under Python2; but in Python3 converts str to bytes

self.rl_next_input = s does not work bytes

Removing the encode makes ipython3 work as expected. However I have not tested it
on a case where the encode matters when using python2. Older versions of ipython do not have this encode statement.

Apparently only these 2 magic functions use set_next_input(), and their failure does not trigger any kind of error message.

Thomas Kluyver
Owner
Thomas Kluyver takluyver closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.