From 7ab0a492515d553091e84b370e934e6aac290c99 2014-12-17 23:54:30 From: Thomas Kluyver Date: 2014-12-17 23:54:30 Subject: [PATCH] Merge pull request #7261 from otakucode/master Code for the less magic was unnecessarily reading the entire input file ... --- diff --git a/IPython/kernel/zmq/zmqshell.py b/IPython/kernel/zmq/zmqshell.py index 332cbb1..5e5a3b8 100644 --- a/IPython/kernel/zmq/zmqshell.py +++ b/IPython/kernel/zmq/zmqshell.py @@ -229,7 +229,6 @@ class KernelMagics(Magics): if not arg_s: raise UsageError('Missing filename.') - cont = open(arg_s).read() if arg_s.endswith('.py'): cont = self.shell.pycolorize(openpy.read_py_file(arg_s, skip_encoding_cookie=False)) else: