[issue4035] Support bytes for os.exec*()

2009-05-16 Thread Daniel Diniz
Changes by Daniel Diniz : -- components: +Library (Lib) priority: -> high type: -> feature request versions: +Python 3.1 -Python 3.0 ___ Python tracker ___ _

[issue4035] Support bytes for os.exec*()

2009-01-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: Any discussion in the tracker should be deferred until a PEP has been written, discussed, and accepted. Then the question whether to accept a specific patch shouldn't be a matter of taste, but should follow from the general rules that the PEP has set up. _

[issue4035] Support bytes for os.exec*()

2009-01-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Every function of the Windows API comes in pair: an Ansi function (which accepts char* names) and a Wide function (which accepts wchar_t* names; Py_UNICODE* can be passed as-is) Don't perform conversion on Windows, just call the proper function. --

[issue4035] Support bytes for os.exec*()

2009-01-01 Thread STINNER Victor
STINNER Victor added the comment: > Hmm, I think the supported types should be the same for all > platforms, otherwise it creates unnecessary headaches. I'm don't know Windows very well, but I read many times that Windows uses unicode everywhere. I'm unable to decide if it's a good thing or n

[issue4035] Support bytes for os.exec*()

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, I think the supported types should be the same for all platforms, otherwise it creates unnecessary headaches. Perhaps, in addition to the proposed behaviour on Posix (convert everything to bytes if the program name is a bytes object), the reverse could be

[issue4035] Support bytes for os.exec*()

2008-10-07 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11695/os_exec_bytes.patch ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4035] Support bytes for os.exec*()

2008-10-07 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Improved patch: - support bytes in the env dictionary using the file system default encoding - support bytes for program arguments but only on a POSIX system Document is not updated yet. Added file: http://bugs.python.org/file11741/os_exe

[issue4035] Support bytes for os.exec*()

2008-10-07 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The patch is incomplete. It allows bytes for the arguments but not for the environment variables: posix_execve() in Modules/posixmodule.c uses: PyArg_Parse(key "s", &k) PyArg_Parse(val "s", &v) ___ Pyth

[issue4035] Support bytes for os.exec*()

2008-10-07 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Can you come up with a test case? Also, it would probably be good to document what parameters can have what datatypes in the exec family of functions. ___ Python tracker <[EMAIL PROTECTED]>

[issue4035] Support bytes for os.exec*()

2008-10-04 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The fix can be changed to be specific to POSIX system: +if name == 'posix' \ +and isinstance(file, bytes): +encoding = sys.getfilesystemencoding() +PATH = (bytes(dir, encoding) for dir in PATH) My example was incorrect

[issue4035] Support bytes for os.exec*()

2008-10-04 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: This is incorrect. On Windows, if the path contains characters with no representation in CP_ACP, encoding the path as bytes makes it invalid. -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]

[issue4035] Support bytes for os.exec*()

2008-10-03 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: 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;