Author vstinner
Recipients vstinner
Date 2008-10-03.23:38:22
SpamBayes Score 1.59978e-12
Marked as misclassified No
Message-id <>
os.exec*() functions doesn't support bytes if the program name doesn't 
use absolute path. The problem is that PATH is used to complete the 
full path but Python3 disallows bytes+str (which is a good thing!). 

python -c "import os; os.execvp('pwd', 'pwd')"
Traceback (most recent call last):
  File "/home/haypo/prog/py3k/Lib/", line 328, in execvp
    _execvpe(file, args)
  File "/home/haypo/prog/py3k/Lib/", line 364, in _execvpe
    func(fullname, *argrest)
TypeError: execv() arg 2 must be a tuple or list

Attached patch allows bytes in os.exec*(). It converts each directory 
of PATH using sys.getfilesystemencoding().
Date User Action Args
2008-10-03 23:38:24vstinnersetrecipients: + vstinner
2008-10-03 23:38:24vstinnersetmessageid: <>
2008-10-03 23:38:23vstinnerlinkissue4035 messages
2008-10-03 23:38:23vstinnercreate