Show More
@@ -1730,7 +1730,7 b' class InteractiveShell(Configurable, Magic):' | |||
|
1730 | 1730 | args = arg_s.split(' ',1) |
|
1731 | 1731 | magic_name = args[0] |
|
1732 | 1732 | magic_name = magic_name.lstrip(prefilter.ESC_MAGIC) |
|
1733 | ||
|
1733 | ||
|
1734 | 1734 | try: |
|
1735 | 1735 | magic_args = args[1] |
|
1736 | 1736 | except IndexError: |
@@ -2453,12 +2453,11 b' class InteractiveShell(Configurable, Magic):' | |||
|
2453 | 2453 | The global namespace for expansion is always the user's interactive |
|
2454 | 2454 | namespace. |
|
2455 | 2455 | """ |
|
2456 | ||
|
2457 | return str(ItplNS(cmd, | |
|
2458 | self.user_ns, # globals | |
|
2456 | res = ItplNS(cmd, self.user_ns, # globals | |
|
2459 | 2457 | # Skip our own frame in searching for locals: |
|
2460 | 2458 | sys._getframe(depth+1).f_locals # locals |
|
2461 |
) |
|
|
2459 | ) | |
|
2460 | return str(res).decode(res.codec) | |
|
2462 | 2461 | |
|
2463 | 2462 | def mktempfile(self, data=None, prefix='ipython_edit_'): |
|
2464 | 2463 | """Make a new tempfile and return its filename. |
@@ -282,6 +282,7 b' def make_quoted_expr(s):' | |||
|
282 | 282 | tail = '' |
|
283 | 283 | tailpadding = '' |
|
284 | 284 | raw = '' |
|
285 | ucode = 'u' | |
|
285 | 286 | if "\\" in s: |
|
286 | 287 | raw = 'r' |
|
287 | 288 | if s.endswith('\\'): |
@@ -298,7 +299,7 b' def make_quoted_expr(s):' | |||
|
298 | 299 | else: |
|
299 | 300 | # give up, backslash-escaped string will do |
|
300 | 301 | return '"%s"' % esc_quotes(s) |
|
301 | res = raw + quote + s + tailpadding + quote + tail | |
|
302 | res = ucode + raw + quote + s + tailpadding + quote + tail | |
|
302 | 303 | return res |
|
303 | 304 | |
|
304 | 305 |
General Comments 0
You need to be logged in to leave comments.
Login now