[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Looking at the only use case of _syscmd_file(), it may not even be worth the trouble of adding the -b option. Fixing the doc-string may be enough: (...) Well, my problem is that _syscmd_file() fails with a non encodable

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @lemburg: Your mail client likes to change the issues' title by adding some spaces :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9560

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Looking at the only use case of _syscmd_file(), it may not even be worth the trouble of adding the -b option. Fixing the doc-string may be enough:

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @r.david.murray, @lemburg: So, can I commit my patch? However, it is still possible to have that path contain weird characters, so the example is still valid. It's not only a question of weird characters. Use case of #8611:

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: @r.david.murray, @lemburg: So, can I commit my patch? Yes, go ahead with 3.2 patch. It should not go into 2.7, though, since it doesn't solve any

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited as r83981. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9560 ___

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch looks good. Can it/should it be applied to 2.7 too? Just one nit: could you please indent the doc-string to match the original indentation ? Done. New patch attached. Is it ok like that? -- Added file:

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Hey! I don't know why, but I posted a truncated patch. It doesn't remove the code removing the filename and so it breaks the code. New try: version 3 should be ok :-) -- Added file:

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file18493/_syscmd_file-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9560 ___

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file18470/_syscmd_file.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9560 ___

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Is it guaranteed that the -b option will be present in every version of file? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9560

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-12 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Guaranteed? No. -b is not required by posix/SUS. I bet it exists everywhere we care about, though. (cf. http://en.wikipedia.org/wiki/File_(command)) -- nosy: +r.david.murray ___ Python

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-10 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Lib/platform.py was created 7 years ago by r32391. _syscmd_file() docstring was never changed whereas it is inconsistent with the implementation: --- def _syscmd_file(target,default=''): Interface to the system's file

[issue9560] platform.py: use -b option for file command in _syscmd_file()

2010-08-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: New submission from STINNER Victor victor.stin...@haypocalc.com: Lib/platform.py was created 7 years ago by r32391. _syscmd_file() docstring was never changed whereas it is inconsistent with the implementation: