[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Elja van Tol

New submission from Elja van Tol:

I tried a simple console command:
 import subprocess
 subprocess.call([dir], shell=True)

Which failed with an WindowsError 2, (could not find file)

After much googling i found out that this is caused by os.environ['COMSPEC']
(http://stackoverflow.com/questions/20330385/cannot-find-the-file-specified-when-using-subprocess-calldir-shell-true-in#comment30370433_20335954)

At first my COMSPEC was:
C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common 
Files\Intel\WirelessCommon\;C:\Users\welja\AppData\Roaming\Composer\vendor\phpunit\phpunit;C:\Python27;

I added ;%SystemRoot%\System32\cmd.exe but that failed.

I then changed COMSPEC to only contain %SystemRoot%\System32\cmd.exe and that 
worked.

( Please fix this for others like me, users stuck on windows with no knowlegde 
of Python who just try to get Fabric to work to deploy some PHP sites :) )

--
components: Windows
messages: 213234
nosy: elja
priority: normal
severity: normal
status: open
title: COMSPEC with multiple paths breaks subprocess.call
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20894
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +brian.curtin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20894
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread R. David Murray

R. David Murray added the comment:

This was a misconfiguration of your system.  It is not a bug in Python.  
(Unless can find a microsoft reference that says that COMPSPEC can contain more 
than one path?  I don't think you will; see, eg: 
http://superuser.com/questions/446595/is-it-valid-for-comspec-to-have-multiple-entries)

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20894
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20894] COMSPEC with multiple paths breaks subprocess.call

2014-03-12 Thread Elja van Tol

Elja van Tol added the comment:

I stand corrected, now i have to find out why my comspec was filled with 
nonsense. 
Sorry for the trouble!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20894
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com