mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
This commit is contained in:
parent
53221e371d
commit
74fe9f307d
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import types
|
||||
import pipes
|
||||
import sys
|
||||
import codecs
|
||||
import tempfile
|
||||
|
@ -458,7 +459,7 @@ class IOBinding:
|
|||
else: #no printing for this platform
|
||||
printPlatform = False
|
||||
if printPlatform: #we can try to print for this platform
|
||||
command = command % filename
|
||||
command = command % pipes.quote(filename)
|
||||
pipe = os.popen(command, "r")
|
||||
# things can get ugly on NT if there is no printer available.
|
||||
output = pipe.read().strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue