|
34 | 34 | # Local imports
|
35 | 35 | from spyderlib.baseconfig import get_conf_path, _
|
36 | 36 | from spyderlib.utils import programs
|
37 |
| -from spyderlib.utils.misc import (get_error_match, |
38 |
| - remove_trailing_single_backslash) |
| 37 | +from spyderlib.utils.misc import get_error_match, remove_backslashes |
39 | 38 | from spyderlib.utils.qthelpers import (get_icon, get_std_icon, create_action,
|
40 | 39 | create_toolbutton, add_actions)
|
41 | 40 | from spyderlib.widgets.tabs import Tabs
|
@@ -690,17 +689,17 @@ def get_current_client(self):
|
690 | 689 |
|
691 | 690 | def run_script_in_current_client(self, filename, wdir, args, debug):
|
692 | 691 | """Run script in current client, if any"""
|
693 |
| - norm = lambda text: remove_trailing_single_backslash(unicode(text)) |
| 692 | + norm = lambda text: remove_backslashes(unicode(text)) |
694 | 693 | client = self.get_current_client()
|
695 | 694 | if client is not None:
|
696 | 695 | # Internal kernels, use runfile
|
697 | 696 | if client.kernel_widget_id is not None:
|
698 |
| - line = "%s(r'%s'" % ('debugfile' if debug else 'runfile', |
699 |
| - unicode(filename)) |
| 697 | + line = "%s('%s'" % ('debugfile' if debug else 'runfile', |
| 698 | + norm(filename)) |
700 | 699 | if args:
|
701 |
| - line += ", args=r'%s'" % norm(args) |
| 700 | + line += ", args='%s'" % norm(args) |
702 | 701 | if wdir:
|
703 |
| - line += ", wdir=r'%s'" % norm(wdir) |
| 702 | + line += ", wdir='%s'" % norm(wdir) |
704 | 703 | line += ")"
|
705 | 704 | else: # External kernels, use %run
|
706 | 705 | line = "%run "
|
|
0 commit comments