Message74283
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2008年10月03日.23:38:22 |
| SpamBayes Score |
1.5997759e-12 |
| Marked as misclassified |
No |
| Message-id |
<1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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!).
Example:
python -c "import os; os.execvp('pwd', 'pwd')"
Traceback (most recent call last):
...
File "/home/haypo/prog/py3k/Lib/os.py", line 328, in execvp
_execvpe(file, args)
File "/home/haypo/prog/py3k/Lib/os.py", 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(). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年10月03日 23:38:24 | vstinner | set | recipients:
+ vstinner |
| 2008年10月03日 23:38:24 | vstinner | set | messageid: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> |
| 2008年10月03日 23:38:23 | vstinner | link | issue4035 messages |
| 2008年10月03日 23:38:23 | vstinner | create |
|