Previously all non-ASCII characters were hex-escaped on output.
However, many resource files use MacRoman characters in resource names
and sometimes in resource types, so it makes sense to use MacRoman in
the interest of readability.
Previously, when some aspect of a resource's metadata was not present
(e. g. a resource with no name), the description would
explicitly point this out (and e. g. say "unnamed"). Now missing parts
of the metadata are simply omitted from the description, resulting in
cleaner output in many cases.
The resource description formats used by the listings and dumps have
also been unified. Previously the descriptions were structured slightly
differently in each case; this is now no longer the case.
The broken non-seeking read implementation of ResourceFile is removed,
and non-seekable streams are now handled by reading the entire stream
data first and wrapping it in a BytesIO to make it seekable.
The manual selection of seeking/non-seeking reading has been removed as
well, since it is no longer needed and was already nearly useless.
Unfortunately, reStructuredText requires nested lists to be exactly
visually aligned. There is no single indent size that works for all
lists - for example bullet point lists require two spaces, but numbered
lists require three spaces (or more, depending on how high the numbers
go). This makes reStructuredText incompatible with tab indents.
Altough this library is OS-independent, it is specifically relevant to
Classic Mac OS and OS X, and provides some extra functionality on OS X
(reading actual resource forks, instead of resource fork data stored in
data forks/regular files).
"Topic :: Software Development :: Libraries :: Python Modules" appears
to be specifically for libraries used to develop Python modules, and
not for Python modules in general. A few more appropriate classifiers
have been added instead.
Removed a lot of unused/irrelevant entries (they were from GitHub's
.gitignore template for Python projects) and kept only those that
are actually needed/used.
When using ResourceFork.open, the stream is still closed when the
ResourceFile is closed, because the user has no access to the stream.
This matches the behavior of modules like zipfile and tarfile, which
close their underlying streams if they created them themselves, but not
if they were supplied by the user.
Added the attributes "Resources Locked" and "Printer Driver MultiFinder
Compatible" from ResEdit, as well as more dummy constants (512-16384)
for attributes with no known meaning.