Show More
@@ -134,7 +134,7 b' def extend_shell_behavior(ip):' | |||||
134 | # utility to expand user variables via Itpl |
|
134 | # utility to expand user variables via Itpl | |
135 | # xxx do something sensible with depth? |
|
135 | # xxx do something sensible with depth? | |
136 | ip.IP.var_expand = lambda cmd, lvars=None, depth=2: \ |
|
136 | ip.IP.var_expand = lambda cmd, lvars=None, depth=2: \ | |
137 |
str(ItplNS(cmd |
|
137 | str(ItplNS(cmd, ip.IP.user_ns, get_locals())) | |
138 |
|
138 | |||
139 | def get_locals(): |
|
139 | def get_locals(): | |
140 | """ Substituting a variable through Itpl deep inside the IPSHELL stack |
|
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 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 28 |
|
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 | namespace. |
|
618 | namespace. | |
619 | """ |
|
619 | """ | |
620 |
|
620 | |||
621 |
return str(ItplNS(cmd |
|
621 | return str(ItplNS(cmd, | |
622 | self.user_ns, # globals |
|
622 | self.user_ns, # globals | |
623 | # Skip our own frame in searching for locals: |
|
623 | # Skip our own frame in searching for locals: | |
624 | sys._getframe(depth+1).f_locals # locals |
|
624 | sys._getframe(depth+1).f_locals # locals |
General Comments 0
You need to be logged in to leave comments.
Login now