##// END OF EJS Templates
%time allows IPython syntax
vivainio -
Show More
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Magic functions for InteractiveShell.
3 3
4 $Id: Magic.py 2675 2007-08-27 17:51:15Z vivainio $"""
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(parameter_s,'<timed eval>',mode)
1667 code = compile(expr,'<timed eval>',mode)
1665 1668 except SyntaxError:
1666 1669 mode = 'exec'
1667 code = compile(parameter_s,'<timed exec>',mode)
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
@@ -1,3 +1,8 b''
1 2007-09-03 Ville Vainio <vivainio@gmail.com>
2
3 * Magic.py: %time now passes expression through prefilter,
4 allowing IPython syntax.
5
1 6 2007-09-01 Ville Vainio <vivainio@gmail.com>
2 7
3 8 * ipmaker.py: Always show full traceback when newstyle config fails
General Comments 0
You need to be logged in to leave comments. Login now