ISOHeader (version 1.1)
index
/newhome/dmcc/prj/ISOHeader/ISOHeader.py

Python interface to ISO9660 volume attributes (title, publisher, etc.)
 
I wrote this because the traditional Python ISO9660 package no longer
compiled very well with the new SWIG.  It seemed like a mess to work
with and this project took only about a half hour.  Additionally, this
is pure Python, and I couldn't think of a good reason to use C/SWIG for
a task this simple.  I used the file isosize.c (included with IsoInfo)
to get descriptions of the attributes.
See the class ISOHeader for usage.
 
This also works as a command line utility:
 
    python ISOHeader.py /dev/cdrom

 
Modules
            
os
sys
 
Classes
            
ISOHeader
 
class ISOHeader
      Allows access to many of the attributes on an ISO9660 volume.
 
Common attributes:
    volume_id (the CD title, also aliased to title)
    publisher_id
    creation_time (a string like '2002011313145500')
    data_preparer_id
 
Example:
    cdrom = ISOHeader('/dev/cdrom')
    print cdrom.title
    print cdrom.publisher_id
    
See the attributes static method for a list of all ISO attributes.
 
   Methods defined here:
__init__(self, device, autostrip=1)
device is a device with a CD in it, like '/dev/hdd' or
'/dev/cdrom'.  autostrip is whether each attribute should have
whitespace stripped from each end.

Static methods defined here:
attributes()
Returns a list of all ISOHeader attribute names

Data and non-method functions defined here:
__doc__ = 'Allows access to many of the attributes on an IS...s static method for a list of all ISO attributes.'
__module__ = 'ISOHeader'
offsets = ((32767, 1, 'type'), (32768, 7, 'id'), (32773, 1, 'version'), (32776, 32, 'system_id'), (32808, 32, 'volume_id'), (32887, 3, 'volume_set_size'), (32891, 3, 'volume_seq_size'), (32958, 128, 'volume_set_id'), (33086, 128, 'publisher_id'), (33214, 128, 'data_preparer_id'), (33342, 128, 'application_id'), (33470, 32, 'copyright_file_id'), (33506, 32, 'abstract_file_id'), (33581, 16, 'creation_time'), (33598, 16, 'modification_time'), (33615, 16, 'expiry_time'), (33632, 16, 'effective_time'))
 
Data
             __all__ = ['ISOHeader']
__author__ = 'David McClosky (dmcc@bigasterisk.com)'
__credits__ = 'Based on the famous Bash script (as seen in the\n...Drew Perttula for\nhis code audit and suggestions.'
__file__ = './ISOHeader.pyc'
__name__ = 'ISOHeader'
__version__ = '1.1'
 
Author
             David McClosky (dmcc@bigasterisk.com)
 
Credits
             Based on the famous Bash script (as seen in the
CD-Writing-HOWTO) which does the same thing and cdrecord's isoinfo.c,
as seen in the Python package IsoInfo.  Thanks to Drew Perttula for
his code audit and suggestions.