Skip to content

Commit

Permalink
Fixes #976 IPython REPL will not start
Browse files Browse the repository at this point in the history
Adds missing str->bytes conversion for Python 3.x.
  • Loading branch information
zooba committed Nov 12, 2015
1 parent 0037b7b commit 729f5fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/Product/PythonTools/visualstudio_ipython_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import re
import sys
from visualstudio_py_repl import BasicReplBackend, ReplBackend, UnsupportedReplException, _command_line_to_args_list
from visualstudio_py_util import to_bytes
try:
import thread
except:
Expand Down Expand Up @@ -293,7 +294,7 @@ def get_extra_arguments(self):
def execute_file_as_main(self, filename, arg_string):
f = open(filename, 'rb')
try:
contents = f.read().replace("\r\n", "\n")
contents = f.read().replace(to_bytes("\r\n"), to_bytes("\n"))
finally:
f.close()
args = [filename] + _command_line_to_args_list(arg_string)
Expand Down

0 comments on commit 729f5fa

Please sign in to comment.