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

Module linda.dpkgver

Parse and compare Debian version strings.

This module contains a class designed to sit in your Python code pretty naturally and represent a Debian version string. It implements various special methods to make dealing with them sweet.
Classes
DpkgVersion Debian version number.

Exceptions
BadEpochError  
BadInputError  
BadRevisionError  
BadUpstreamError  
VersionError  

Function Summary
  deb_cmp(x, y)
Implement the string comparison outlined by Debian policy.
  deb_cmp_str(x, y)
Compare two strings in a deb version.
  deb_order(str, idx)
Return the comparison order of two characters.
  strcut(str, idx, accept)
Cut characters from str that are entirely in accept.

Variable Summary
str __author__ = 'Scott James Remnant <scott@netsplit.com>'
str cmp_table = '~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop...
SRE_Pattern valid_epoch = ^[0-9]+$
SRE_Pattern valid_revision = ^[A-Za-z0-9\+\.~]+$
SRE_Pattern valid_upstream = ^[0-9][A-Za-z0-9\+:\.~-]*$

Function Details

deb_cmp(x, y)

Implement the string comparison outlined by Debian policy.

deb_cmp_str(x, y)

Compare two strings in a deb version.

deb_order(str, idx)

Return the comparison order of two characters.

strcut(str, idx, accept)

Cut characters from str that are entirely in accept.

Variable Details

__author__

Type:
str
Value:
'Scott James Remnant <scott@netsplit.com>'                             

cmp_table

Type:
str
Value:
'~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-.:'            

valid_epoch

Type:
SRE_Pattern
Value:
^[0-9]+$                                                               

valid_revision

Type:
SRE_Pattern
Value:
^[A-Za-z0-9\+\.~]+$                                                    

valid_upstream

Type:
SRE_Pattern
Value:
^[0-9][A-Za-z0-9\+:\.~-]*$                                             

Generated by Epydoc 2.1 on Tue Aug 8 08:30:46 2006 http://epydoc.sf.net