| |
- __builtin__.object
-
- IsoImage
- IsoImageModification
-
- IsoImageModificationByReplacement
- IsoImageModificationFromByteRange
- IsoImageModificationFromPath
- IsoImageModificationFromString
class IsoImage(__builtin__.object) |
|
An .iso ISO 9660 (or UDF) CD-ROM or DVD-ROM disk image. |
|
Methods defined here:
- __init__(self, isoImagePath)
- Create new IsoImage descriptor.
A descriptor can describe an .iso image that does or doesn't yet exist on the host disk.
- cloneWithModifications(self, modifications=[], cloneIsoImagePath=None, udf=False, ignoreJoliet=True, pause=False)
- Clone with any number of instances of IsoImageModification applied.
A temporary assembly directory in the same directory as cloneIsoImagePath needs disk space,
but it is removed automatically upon completion of cloning.
modifications
a list of IsoImageModification instances.
cloneIsoImagePath
if not given then in same directory with a timestamp in the filename.
return
IsoImage(cloneIsoImagePath).
- cloneWithModificationsUsingMount(self, modifications=[], cloneIsoImagePath=None, udf=False, ignoreJoliet=True, pause=False)
- Clone with any number of instances of IsoImageModification applied.
This is an older implementation which regrettably because of the mount command requires
having superuser privileges.
It is still here in case a newer implementation doesn't work right, which could be for any
of a number of reasons, for example for symbolic links.
A temporary assembly directory in the same directory as cloneIsoImagePath needs disk space,
but it is removed automatically upon completion of cloning.
modifications
a list of IsoImageModification instances.
cloneIsoImagePath
if not given then in same directory with a timestamp in the filename.
return
IsoImage(cloneIsoImagePath).
- copyToDirectory(self, copyDirectory, udf=False, ignoreJoliet=True, tolerance=0.0)
- Copy all files into a directory.
Not using mount command, no need to run as root.
- exists(self)
- Return True if .iso image exists on the host disk.
- genisoimageOptions(self, label=None, udf=False, ignoreJoliet=True)
- Auxiliary method, called by cloneWithModifications.
Can be overridden by subclass methods genisoimageOptions,
which may want to extend the returned list.
Could be improved in the future.
Could recognize content of .iso image.
Could select different options depending on content of .iso image.
Maybe could use iso-info -d 9 -i self.isoImagePath.
Could be overridden for a subclass.
- mount(self, mountDir, udf=False)
- Mount .iso image.
- remove(self)
- Remove (delete) .iso image from the host disk.
- unmount(self)
- Unmount .iso image.
Class methods defined here:
- commandsUsedInImplementation(cls) from __builtin__.type
- Return a list to be passed to SystemRequirements.commandsRequired().
This class can be passed to SystemRequirements.commandsRequiredByImplementations().
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- isoImagePath
- Path of the .iso image.
|
class IsoImageModificationByReplacement(IsoImageModification) |
|
A modification to an .iso image, replace within file.
Treats whole file as one string to match.
To match a newline a regular expression may use "(\r?\n)",
which nicely allows in the replacement to place appropriate newlines
by backreference, e.g. by "\g<1>". |
|
- Method resolution order:
- IsoImageModificationByReplacement
- IsoImageModification
- __builtin__.object
Methods defined here:
- __init__(self, pathOnIso, regularExpression, replacement, encoding='utf-8')
- writeIntoAssembly(self, temporaryAssemblyDirectory)
Methods inherited from IsoImageModification:
- pathInTemporaryAssemblyDirectory(self, temporaryAssemblyDirectory)
- Auxiliary method, called by subclass method writeIntoAssembly.
Data descriptors inherited from IsoImageModification:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|