Show More
@@ -2122,7 +2122,7 b' class InteractiveShell(Configurable, Magic):' | |||||
2122 | # This seems like a reasonable usability design. |
|
2122 | # This seems like a reasonable usability design. | |
2123 | last = blocks[-1] |
|
2123 | last = blocks[-1] | |
2124 | if len(last.splitlines()) < 2: |
|
2124 | if len(last.splitlines()) < 2: | |
2125 |
self.runcode(' |
|
2125 | self.runcode(''.join(blocks[:-1])) | |
2126 | self.runlines(last) |
|
2126 | self.runlines(last) | |
2127 | else: |
|
2127 | else: | |
2128 | self.runcode(cell) |
|
2128 | self.runcode(cell) |
@@ -113,7 +113,9 b' def import_pylab(user_ns, backend, import_all=True, shell=None):' | |||||
113 | shell.register_post_execute(flush_svg) |
|
113 | shell.register_post_execute(flush_svg) | |
114 | else: |
|
114 | else: | |
115 | from IPython.zmq.pylab.backend_payload_svg import paste |
|
115 | from IPython.zmq.pylab.backend_payload_svg import paste | |
116 | user_ns['paste'] = paste |
|
116 | from matplotlib import pyplot | |
|
117 | # Add 'paste' to pyplot and to the user's namespace | |||
|
118 | user_ns['paste'] = pyplot.paste = paste | |||
117 |
|
119 | |||
118 | if import_all: |
|
120 | if import_all: | |
119 | exec("from matplotlib.pylab import *\n" |
|
121 | exec("from matplotlib.pylab import *\n" |
General Comments 0
You need to be logged in to leave comments.
Login now