##// END OF EJS Templates
%time allows IPython syntax
vivainio -
Show More
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
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 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
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 # fail immediately if the given expression can't be compiled
1661 # fail immediately if the given expression can't be compiled
1662
1663 expr = self.shell.prefilter(parameter_s,False)
1664
1662 try:
1665 try:
1663 mode = 'eval'
1666 mode = 'eval'
1664 code = compile(parameter_s,'<timed eval>',mode)
1667 code = compile(expr,'<timed eval>',mode)
1665 except SyntaxError:
1668 except SyntaxError:
1666 mode = 'exec'
1669 mode = 'exec'
1667 code = compile(parameter_s,'<timed exec>',mode)
1670 code = compile(expr,'<timed exec>',mode)
1668 # skew measurement as little as possible
1671 # skew measurement as little as possible
1669 glob = self.shell.user_ns
1672 glob = self.shell.user_ns
1670 clk = clock2
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 2007-09-01 Ville Vainio <vivainio@gmail.com>
6 2007-09-01 Ville Vainio <vivainio@gmail.com>
2
7
3 * ipmaker.py: Always show full traceback when newstyle config fails
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