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