Module cups :: Class PPD
[hide private]
[frames] | no frames]

Class PPD

object --+
         |
        PPD

PPD file

A PPD file.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
integer
conflicts()
Returns: number of conflicts.
None
emit(file, section)
Output marked options for section to a file.
None
emitAfterOrder(file, section, limit, min_order)
Output marked options for section to a file.
None
emitFd(fd, section)
Output marked options for section to a file descriptor.
None
emitJCL(file, job_id, user, title)
Emit code for JCL options to a file.
None
emitJCLEnd(file)
Emit JCLEnd code to a file.
string
emitString(section, min_order)
Return a string with the marked options for section, with at least min_order order dependency.
Attribute or None
findAttr(name)
Returns: matching attribute, or None if not found.
Attribute or None
findNextAttr(name)
Returns: next matching attribute, or None if not found.
Option or None
findOption(name)
Returns: named option, or None if not found.
None
localize()
Localize PPD to the current locale.
string or None
localizeIPPReason(reason, scheme)
Localize IPP reason to the current locale.
string or None
localizeMarkerName(name)
Localize marker name to the current locale.
None
markDefaults()
Set (mark) all options to their default choices.
integer
markOption(option, choice)
Set an option to a particular choice.
boolean
nondefaultsMarked()
Returns true if any non-default option choices are marked.
None
writeFd(fd)
Write PPD file, with marked choices as defaults, to file descriptor.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
Attribute list attributes
list of attributes
Constraint list constraints
list of constraints
Group list optionGroups
list of PPD option groups
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

conflicts()

 
Returns: integer
number of conflicts.

emit(file, section)

 

Output marked options for section to a file.

Parameters:
  • file (file) - file object
  • section (integer) - section id
Returns: None

emitAfterOrder(file, section, limit, min_order)

 

Output marked options for section to a file.

Parameters:
  • file (file) - file object
  • section (integer) - section id
  • limit (integer) - non-zero to use min_order
  • min_order (float) - minumum order dependency
Returns: None

emitFd(fd, section)

 

Output marked options for section to a file descriptor.

Parameters:
  • fd (integer) - file descriptor
  • section (integer) - section id
Returns: None

emitJCL(file, job_id, user, title)

 

Emit code for JCL options to a file.

Parameters:
  • file (file object) - file
  • job_id (integer) - job id
  • user (string) - user name on job
  • title (string) - title of job
Returns: None

emitJCLEnd(file)

 

Emit JCLEnd code to a file.

Parameters:
  • file (file object) - file
Returns: None

emitString(section, min_order)

 

Return a string with the marked options for section, with at least min_order order dependency.

Parameters:
  • section (integer) - section id
  • min_order (float) - minumum order dependency
Returns: string
string containing emitted postscript

findAttr(name)

 
Parameters:
  • name (string) - attribute name
  • spec (string) - specifier string (optional)
Returns: Attribute or None
matching attribute, or None if not found.

findNextAttr(name)

 
Parameters:
  • name (string) - attribute name
  • spec (string) - specifier string (optional)
Returns: Attribute or None
next matching attribute, or None if not found.

findOption(name)

 
Parameters:
  • name (string) - option keyword
Returns: Option or None
named option, or None if not found.

markOption(option, choice)

 

Set an option to a particular choice.

Parameters:
  • option (string) - option keyword
  • choice (string) - option choice
Returns: integer
number of conflicts

writeFd(fd)

 

Write PPD file, with marked choices as defaults, to file descriptor.

Parameters:
  • fd (integer) - open file descriptor
Returns: None