You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
I can see you have all of the iso metadata in there, which is exactly what I'm after. I can't find a built-in method/mechanism for extracting it. While it's possible to iterate over an iso object using something like iso.volume_descriptors['primary'].dict.items(), I wonder if you have a more direct, supported, object method rather than digging into the private dict membership directly?
The text was updated successfully, but these errors were encountered:
I'll could use vars(iso.volume_descriptors['primary']) but a 'header()' method to pull all of them in one swoop would be pretty useful as a generalized mechanism. What do you think?
something like
class PrimaryVD ...
...
def header(self):
return self.dict.items()
and you could call it like
for k, v in iso.volume_descriptors['primary'].header():
print(k + ' = ' + str(v))
This is a deliberate decision as the underlying data is a kind of struct rather than a mapping. Elsewhere in the library we use object attributes for storing data that's specific to that class of object. To me, a dict is the wrong abstraction for VD entries given its set of keys is pre-defined. For your use case I think vars() should do the trick. Hope this sounds reasonable!
I can see you have all of the iso metadata in there, which is exactly what I'm after. I can't find a built-in method/mechanism for extracting it. While it's possible to iterate over an iso object using something like iso.volume_descriptors['primary'].dict.items(), I wonder if you have a more direct, supported, object method rather than digging into the private dict membership directly?
The text was updated successfully, but these errors were encountered: