##// END OF EJS Templates
Do not replace # w/ \# anymore
vivainio -
Show More
@@ -134,7 +134,7 b' def extend_shell_behavior(ip):'
134 134 # utility to expand user variables via Itpl
135 135 # xxx do something sensible with depth?
136 136 ip.IP.var_expand = lambda cmd, lvars=None, depth=2: \
137 str(ItplNS(cmd.replace('#','\#'), ip.IP.user_ns, get_locals()))
137 str(ItplNS(cmd, ip.IP.user_ns, get_locals()))
138 138
139 139 def get_locals():
140 140 """ Substituting a variable through Itpl deep inside the IPSHELL stack
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 2871 2007-11-25 04:28:19Z fperez $
9 $Id: iplib.py 2885 2007-12-07 10:59:06Z vivainio $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -618,7 +618,7 b' class InteractiveShell(object,Magic):'
618 618 namespace.
619 619 """
620 620
621 return str(ItplNS(cmd.replace('#','\#'),
621 return str(ItplNS(cmd,
622 622 self.user_ns, # globals
623 623 # Skip our own frame in searching for locals:
624 624 sys._getframe(depth+1).f_locals # locals
General Comments 0
You need to be logged in to leave comments. Login now