Christian Heimes added the comment: In Python 3.x os.popen is implemented based on subprocess. I believe it's still a problem with subprocess. Python 3.x also drops support for Windows 95 to ME. Would the additional quoting be ok when the code checks for COMPSPEC == "cmd.exe" first?
# Supply os.popen() def popen(cmd, mode="r", buffering=None): if not isinstance(cmd, str): raise TypeError("invalid cmd type (%s, expected string)" % type(cmd)) if mode not in ("r", "w"): raise ValueError("invalid mode %r" % mode) import subprocess, io if mode == "r": proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, bufsize=buffering) return _wrap_close(io.TextIOWrapper(proc.stdout), proc) else: proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, bufsize=buffering) return _wrap_close(io.TextIOWrapper(proc.stdin), proc) __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1475> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com