Re: [Python-Dev] subprocess shell=True on Windows doesn't escape ^ character

2014-06-15 Thread Tim Golden
On 15/06/2014 02:22, Ryan Gonzalez wrote: Of course cmd.exe is hardcoded; Of course it's not: (from Lib/subprocess.py) comspec = os.environ.get(COMSPEC, cmd.exe) I don't often expect, in these post-command.com days, to get anything other than cmd.exe. But alternative command processors are

Re: [Python-Dev] Why does _pyio.*.readinto have to work with 'b' arrays?

2014-06-15 Thread Nick Coghlan
On 15 June 2014 14:57, Nikolaus Rath nikol...@rath.org wrote: On 06/14/2014 09:31 PM, Nick Coghlan wrote: On 15 June 2014 10:41, Benjamin Peterson benja...@python.org wrote: On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: It seems to me that a much cleaner solution would be to simply

Re: [Python-Dev] subprocess shell=True on Windows doesn't escape ^ character

2014-06-15 Thread Paul Moore
On 15 June 2014 00:15, Greg Ewing greg.ew...@canterbury.ac.nz wrote: However, it says the Windows version uses CreateProcess, which doesn't use PATH. Huh? CreateProcess uses PATH: py -3.4 Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32 Type help,

Re: [Python-Dev] subprocess shell=True on Windows doesn't escape ^ character

2014-06-15 Thread Tim Golden
On 15/06/2014 08:54, Paul Moore wrote: On 15 June 2014 00:15, Greg Ewing greg.ew...@canterbury.ac.nz wrote: However, it says the Windows version uses CreateProcess, which doesn't use PATH. Huh? CreateProcess uses PATH: Just to be precise: CreateProcess *doesn't* use PATH if you pass an

Re: [Python-Dev] Why does _pyio.*.readinto have to work with 'b' arrays?

2014-06-15 Thread Victor Stinner
Le 15 juin 2014 02:42, Benjamin Peterson benja...@python.org a écrit : On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: It seems to me that a much cleaner solution would be to simply declare _pyio's readinto to only work with bytearrays, and to explicitly raise a (more helpful)

Re: [Python-Dev] subprocess shell=True on Windows doesn't escape ^ character

2014-06-15 Thread Greg Ewing
Paul Moore wrote: Huh? CreateProcess uses PATH: Hmm, in that case Microsoft's documentation is lying, or subprocess is doing something itself before passing the command name to CreateProcess. Anyway, looks like there's no problem. -- Greg ___

Re: [Python-Dev] Why does _pyio.*.readinto have to work with 'b' arrays?

2014-06-15 Thread Nikolaus Rath
Nick Coghlan ncogh...@gmail.com writes: On 15 June 2014 14:57, Nikolaus Rath nikol...@rath.org wrote: On 06/14/2014 09:31 PM, Nick Coghlan wrote: On 15 June 2014 10:41, Benjamin Peterson benja...@python.org wrote: On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: It seems to me that a much

Re: [Python-Dev] Why does _pyio.*.readinto have to work with 'b' arrays?

2014-06-15 Thread Nikolaus Rath
Victor Stinner victor.stin...@gmail.com writes: Le 15 juin 2014 02:42, Benjamin Peterson benja...@python.org a écrit : On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: It seems to me that a much cleaner solution would be to simply declare _pyio's readinto to only work with bytearrays,