Feb-02-2018, 09:58 AM
Quote:Did you have this code mostly figured out or I'm assuming you've worked with nested zip files before?
No, but I think i needed one time the content from an archive as a fileobject.
The rest is experience. When you know which functions returns which types, it's very helpful. Also the knowledge about duck-typing helps. For example a fileobject is something, that implements the methods of a fileobject. If you have for example a string and want to convert it to a usable fileobject:
fd = io.StringIO('Hello World')
. Mostly all parts from the python stdlib sticks good together. This is the cause why I love this language.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!