Package linda :: Module dpkgver :: Class DpkgVersion
[show private | hide private]
[frames | no frames]

Type DpkgVersion

object --+
         |
        DpkgVersion


Debian version number.

This class is designed to be reasonably transparent and allow you to write code like:
>>> s.version >= '1.100-1'

The comparison will be done according to Debian rules, so '1.2' will compare lower.

Properties:
Method Summary
  __init__(self, ver)
Parse a string or number into the three components.
  __cmp__(self, other)
Compare two Version classes.
  __repr__(self)
Return a debugging representation of the object.
  __str__(self)
Return the class as a string for printing.
  getWithoutEpoch(self)
Return the version without the epoch.
  is_native(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Property Summary
  without_epoch

Method Details

__init__(self, ver)
(Constructor)

Parse a string or number into the three components.
Overrides:
__builtin__.object.__init__

__cmp__(self, other)
(Comparison operator)

Compare two Version classes.

__repr__(self)
(Representation operator)

Return a debugging representation of the object.
Overrides:
__builtin__.object.__repr__

__str__(self)
(Informal representation operator)

Return the class as a string for printing.
Overrides:
__builtin__.object.__str__

getWithoutEpoch(self)

Return the version without the epoch.

Property Details

without_epoch

Get Method:
getWithoutEpoch(self)

Generated by Epydoc 2.1 on Wed Nov 8 12:34:03 2006 http://epydoc.sf.net