diff --git a/IPython/zmq/zmqshell.py b/IPython/zmq/zmqshell.py index 20b037a..d707ed0 100644 --- a/IPython/zmq/zmqshell.py +++ b/IPython/zmq/zmqshell.py @@ -355,7 +355,7 @@ class KernelMagics(Magics): cont = open(arg_s).read() if arg_s.endswith('.py'): - cont = self.shell.pycolorize(cont) + cont = self.shell.pycolorize(io.source_to_unicode(cont)) page.page(cont) more = line_magic('more')(less)