[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

Sridhar Ratnakumar report at bugs.python.org
Wed Mar 24 19:26:00 CET 2010


New submission from Sridhar Ratnakumar <sridharr at activestate.com>:

Assume you have two executables in currect directory:

  baz.exe
  foo.bar.exe

Now "subprocess.Popen(['baz'])" will run successfully. But "subprocess.Popen(['foo.bar'])" will throw the following exception:

Traceback (most recent call last):
  [...]
  File "C:\Python26\lib\subprocess.py", line 483, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Python26\lib\subprocess.py", line 470, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python26\lib\subprocess.py", line 621, in __init__
    errread, errwrite)
  File "C:\Python26\lib\subprocess.py", line 830, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

The workaround is to specify the full name "foo.bar.exe".

----------
components: Library (Lib), Windows
messages: 101646
nosy: srid
severity: normal
status: open
title: subprocess.Popen raises WindowsError if there is a dot in program name
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8224>
_______________________________________


More information about the Python-bugs-list mailing list