[Patches] [ python-Patches-1576313 ] os.execvp[e] on win32 fails for current directory
SourceForge.net
noreply at sourceforge.net
Sat Oct 14 21:51:21 CEST 2006
Patches item #1576313, was opened at 2006-10-13 02:57
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1576313&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Snaury (snaury)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.execvp[e] on win32 fails for current directory
Initial Comment:
By convention when program is executed by searching
path, the first directory to be searched should be the
current directory. However on python this is not true:
1.c:
int main() { return 1; }
test.py:
import os
os.execvp('1', ('1',))
result:
Traceback (most recent call last):
File "C:\1\test.py", line 2, in <module>
os.execvp('1',('1',))
File "D:\Programs\ActiveState\Python25\lib\os.py",
line 348, in execvp
_execvpe(file, args)
File "D:\Programs\ActiveState\Python25\lib\os.py",
line 386, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
Attached patch fixes this.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2006-10-14 21:51
Message:
Logged In: YES
user_id=21627
What convention are you referring to? By convention, you
have to specify executables in the current directory with
./<program> if you don't have "." in your path.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1576313&group_id=5470
More information about the Patches
mailing list