twoolie / NBT

Python Parser/Writer for the NBT file format, and it's container the RegionFile.
MIT License
362 stars 74 forks source link

Fix sample extraction under Windows #56

Closed stumpylog closed 12 years ago

stumpylog commented 12 years ago

The current tests/downloadsample.py will fail to extract any files from the downloaded archive due to path naming issues between Unix (or is it Posix?) style and Windows style. This fixes that issue, and has been tested under Windows and Posix systems.

Also, completely unrelated to issue #51, but adds documentation, trims trailing spaces, and does not include my Anvil updates examples/to map.py

macfreek commented 12 years ago

To be honest, I'm not a big fan of this particular pull request -- it indeed fixes the windows download, but also has a lot of other changes, mostly whitespace and one -presumably accidental- revert of a recent change in a docstring (which gave warnings). I personally do like the white space, but that is because my editor (TextMate) needs it to collapse functions and classes. (If it sees a blank line, it assume the function or class definition has ended).

Given that you (@stumpylog) based some of your branches on it, I presume it is easier to pull it. So I'll do that. I may reapply the docstring fix in a subsequent commit.) @Twoolie: do you have any preference with regard to whitespace: should blank lines between methods be really blank or may they be indented?

stumpylog commented 12 years ago

@macfreek Sorry all the extraneous commits in this one. Now that I have my branches set up better, pull requests should be more uniform.