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

2010-08-13 Thread STINNER Victor
STINNER Victor added the comment: Commited as r83981. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

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

2010-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor 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 problems in 2.7. If we get complaints about

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

2010-08-13 Thread STINNER Victor
STINNER Victor 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: install Python in a directory

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

2010-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor 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

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

2010-08-13 Thread STINNER Victor
STINNER Victor added the comment: @lemburg: Your mail client likes to change the issues' title by adding some spaces :-) -- ___ Python tracker ___ __

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

2010-08-13 Thread STINNER Victor
STINNER Victor 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 filename on Linux because the fi

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

2010-08-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > > Is it guaranteed that the -b option will be present in every version of file? Looking at the only use case of _syscmd_file(), it may not even be worth the trouble of adding the -b option. Fixing t

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

2010-08-12 Thread R. David Murray
R. David Murray 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 tracker

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

2010-08-12 Thread Éric Araujo
Éric Araujo added the comment: Is it guaranteed that the -b option will be present in every version of file? -- nosy: +eric.araujo ___ Python tracker ___

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

2010-08-12 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18470/_syscmd_file.patch ___ Python tracker ___ ___ Python-bugs-list maili

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

2010-08-12 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18493/_syscmd_file-2.patch ___ Python tracker ___ ___ Python-bugs-list mai

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

2010-08-12 Thread STINNER Victor
STINNER Victor 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: http://bugs.python.org/file18494/_syscmd_file-3.patch __

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

2010-08-12 Thread STINNER Victor
STINNER Victor 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: http://bugs.python.org/file18493

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

2010-08-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > 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=

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

2010-08-10 Thread STINNER Victor
New submission from STINNER Victor : 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 command. The function u