summaryrefslogtreecommitdiff
path: root/Lib/idlelib/ScriptBinding.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-08-06 00:54:07 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2015-08-06 00:54:07 -0400
commit5c28e9f887d8a8089d4e5ed6060e61a0da5afbe2 (patch)
tree3986f06cc566919ce3c52518a10a8acd4cee4de8 /Lib/idlelib/ScriptBinding.py
parent8c125eb44b528ba22b43cdf5da49e408082865fa (diff)
downloadcpython-git-5c28e9f887d8a8089d4e5ed6060e61a0da5afbe2.tar.gz
Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
Diffstat (limited to 'Lib/idlelib/ScriptBinding.py')
-rw-r--r--Lib/idlelib/ScriptBinding.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index d700525a73..e8cb2fc6b7 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -36,6 +36,7 @@ To fix case 2, change all tabs to spaces by using Edit->Select All followed \
by Format->Untabify Region and specify the number of columns used by each tab.
"""
+
class ScriptBinding:
menudefs = [
@@ -142,7 +143,8 @@ class ScriptBinding:
return 'break'
interp = self.shell.interp
if PyShell.use_subprocess:
- interp.restart_subprocess(with_cwd=False, filename=code.co_filename)
+ interp.restart_subprocess(with_cwd=False, filename=
+ self.editwin._filename_to_unicode(filename))
dirname = os.path.dirname(filename)
# XXX Too often this discards arguments the user just set...
interp.runcommand("""if 1: