Show More
@@ -1,7 +1,7 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """Magic functions for InteractiveShell. |
|
3 | 3 | |
|
4 |
$Id: Magic.py 2 |
|
|
4 | $Id: Magic.py 2705 2007-09-04 15:10:37Z vivainio $""" | |
|
5 | 5 | |
|
6 | 6 | #***************************************************************************** |
|
7 | 7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
@@ -1659,12 +1659,15 b' Currently the magic system has the following functions:\\n"""' | |||
|
1659 | 1659 | """ |
|
1660 | 1660 | |
|
1661 | 1661 | # fail immediately if the given expression can't be compiled |
|
1662 | ||
|
1663 | expr = self.shell.prefilter(parameter_s,False) | |
|
1664 | ||
|
1662 | 1665 | try: |
|
1663 | 1666 | mode = 'eval' |
|
1664 |
code = compile(p |
|
|
1667 | code = compile(expr,'<timed eval>',mode) | |
|
1665 | 1668 | except SyntaxError: |
|
1666 | 1669 | mode = 'exec' |
|
1667 |
code = compile(p |
|
|
1670 | code = compile(expr,'<timed exec>',mode) | |
|
1668 | 1671 | # skew measurement as little as possible |
|
1669 | 1672 | glob = self.shell.user_ns |
|
1670 | 1673 | clk = clock2 |
General Comments 0
You need to be logged in to leave comments.
Login now