Table of Contents

Module: cdrecord interface/cdrecord.py

Interface to the "cdrecord" and "mkisofs" programs to write CD/R's

Functions   
Widget
cddone
cdlog
cdrecord
cli
growisofs
mkisofs
treesize
  Widget 
Widget ( master=None,  directory="." )

A rudimentary gui to write the given directory to a CD/R or DVD/R

Exceptions   
command.GuiCancel
error("Definitely too much data for DVD/ROM (%d GiB)." % round( sz / 1024 / 1024 / 1024 ) )
  cddone 
cddone ()

See whether a CD has been burnt from the current directory.

Checks some variables from the hints file.

Returns the time the cd image was built. That information can be used to see whether something has changed since then.

  cdlog 
cdlog ( s )

Write a message to the cd writer logfile.

  cdrecord 
cdrecord (
        source,
        idlefunc=None,
        verbose=0,
        dummy=0,
        )

Interface to the cdrecord program.

Burn the iso image named in source to the configured CD burner.

Exceptions   
error( "%s does not exist" % source )
error( "'%s' program not installed setuid-root. Can not use as non-root user." % f )
error( "'cdrecord' program not found. Please add its location to your PATH" )
error( "CD Writer has not been configured. Please check the configuration manual for the Collect suite" )
error( "cdrecord failed" )
  cli 
cli ()

A rudimentary CLI to write an image of the current directory to CD/R

  growisofs 
growisofs (
        directory,
        idlefunc=None,
        verbose=0,
        dummy=0,
        )

Interface to the cdrecord program.

Burn the files in the given directory tree to an ISO DVD.

Exceptions   
error( "%s does not exist" % directory )
error( "'%s' program not installed setuid-root. Can not use as non-root user." % f )
error( "'growisofs' program not found. Please add its location to your PATH" )
error( "DVD Writer has not been configured. Please check the configuration manual for the Collect suite" )
error( "growisofs failed" )
  mkisofs 
mkisofs (
        directory,
        target,
        idlefunc=None,
        )

Interface to the mkisofs program.

Make an iso filesystem named in target, from all the files in and under the named directory.

idlefunc will be called regularly during the process, and can be used to keep a GUI up to date.

Exceptions   
error( "CD/ROM image %s exists. Please remove first." % target )
error( "Not enough diskspace in %s for CD/ROM image" % target )
error( "mkisofs failed" )
error("Definitely too much data for CD/ROM (%d MiB)." % round( sz / 1024 / 1024 ) )
error("Directory for image file (%s) does not exist" % os.path.dirname( target ) )
  treesize 
treesize (
        directory=".",
        blocksize=1024,
        unit=1,
        )

Calculate disk space used by files under directory directory.

Each file is supposed to use blocks of blocksize bytes.

The result is returned in units of unit bytes.

Files ending in "~" are ignored.

Classes   
error

Exception raised when something fails.


Table of Contents

This document was automatically generated on Tue Nov 25 12:18:58 2008 by HappyDoc version WORKING