Issue #23672: Allow Idle to edit and run files with astral chars in name.

Patch by Mohd Sanad Zaki Rizvi.
This commit is contained in:
Terry Jan Reedy 2015-08-06 00:54:07 -04:00
parent 8c125eb44b
commit 5c28e9f887
3 changed files with 27 additions and 9 deletions

View file

@ -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: