[issue19920] TarFile.list() fails on some files

Serhiy Storchaka report at bugs.python.org
Sun Jan 26 16:57:03 CET 2014


Serhiy Storchaka added the comment:

1. No. Just use existing nonmodified testtar.tar now. Later we will add new 
items in it.

2. The encoding of sys.stdout is not always the same as default locale 
encoding. You can redirect sys.stdout to text file (opened with different 
encoding) or to socket or pipe (wrapped with TextIOWrapper). So you should use 
sys.stdout.encoding and nothing else. But even this not always work, because 
it can be None (in case of StringIO) or be absent (in case of user file-like 
object). Be aware of all this corner cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19920>
_______________________________________


More information about the Python-bugs-list mailing list