[Python-bugs-list] [ python-Bugs-575770 ] os.spawnv() fails with underscores
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 19 Jul 2002 14:22:39 -0700
Bugs item #575770, was opened at 2002-06-30 22:15
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=575770&group_id=5470
Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Rodrigues (nokta_kanto)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.spawnv() fails with underscores
Initial Comment:
I'm running Python 2.2 in Windows 98.
When trying to os.spawnv() a program in a path that contains an
underscore, the program does not run but no error message is
printed. This error happens in the dos version of Python 2.2, but
not in IDLE.
I detected the error by creating a DOS program that returns the
recognizable value 111. If I call that file "c:\ret111.exe" and run it with
the following command:
os.spawnv( os.P_WAIT, progname, [progname] )
where progname is the full path and name of the program, then the
function returns the value 111. If I put that file in
"c:\pulse_prog\ret111.exe", and run the same command with the new
value of progname, then the return value is 111 in IDLE but 0 in
dos-prompt python.
----------------------------------------------------------------------
>Comment By: Chris Rodrigues (nokta_kanto)
Date: 2002-07-19 21:22
Message:
Logged In: YES
user_id=571002
Here's a screen dump of the error in progress.
I don't know if it makes a difference, but ret111.exe was compiled with
djgpp.
C:\pulse_prog>type ret111.c
int main() {return 111;}
C:\pulse_prog>python
Python 2.2.1c2 (#33, Mar 26 2002, 13:04:18) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.spawnv( os.P_WAIT, r'c:\ret111.exe', [r'c:\ret111.exe'])
111
>>> os.spawnv( os.P_WAIT, r'c:\pulse_prog\ret111.exe',
[r'c:\pulse_prog\ret111.exe'])
0
>>>
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-07-05 16:46
Message:
Logged In: YES
user_id=31435
I can't reproduce this using 2.2.1 under Win98SE. Here's
a screen dump showing exactly what I did. Please show us
exactly what you did.
C:\pulse_prog>type ret111.c
int main() { return 111; }
C:\pulse_prog>cd \python22
C:\Python22>python
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> import os
>>> prog = r"c:\pulse_prog\ret111"
>>> os.spawnv(os.P_WAIT, prog, [prog])
111
>>>
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-07-05 05:52
Message:
Logged In: YES
user_id=21627
Can you please attach the test program to this report?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=575770&group_id=5470