Ñò
‚Ic @ sÕ d Z d Z d i ƒ d i d d ƒ Z d Z d d d d
g \ Z Z Z Z d e
f d „ ƒ YZ d
„ Z d „ Z
d „ Z d „ Z d „ Z d „ Z d „ Z e d ƒ Z e d ƒ Z e d ƒ Z e d ƒ Z d S( s UUID (universally unique identifiers) as specified in RFC 4122.
This module provides the UUID class and the functions uuid1(), uuid3(),
uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs respectively.
This module works with Python 2.3 or higher.s Ka-Ping Yee s $Date: 2005/11/30 11:51:58 $i t /t -s $Revision: 1.10 $s reserved for NCS compatibilitys specified in RFC 4122s$ reserved for Microsoft compatibilitys reserved for future definitiont UUIDc B sª e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e e e ƒ Z
d „ Z e e ƒ Z d „ Z
d „ Z e e
e ƒ Z d
„ Z d „ Z e e e ƒ Z RS( s Instances of the UUID class represent UUIDs as specified in RFC 4122.
Converting a UUID to a string using str() produces a string in the form
"{12345678-1234-1234-1234-123456789abc}". The UUID constructor accepts
a similar string (braces and hyphens optional), or six integer arguments
(with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and 48-bit values
respectively). UUID objects have the following attributes:
bytes gets or sets the UUID as a 16-byte string
urn gets the UUID as a URN as specified in RFC 4122
variant gets or sets the UUID variant as one of the constants
RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE
version gets or sets the UUID version number (1 through 5)
c G sm t | ƒ d j oô | d i d d ƒ i d d ƒ } | i d d ƒ i d d ƒ i d d ƒ } t | ƒ d j p t t d
ƒ ‚ t | d d ƒ } t | d d
!d ƒ } t | d
d !d ƒ } t | d d !d ƒ } t | d d !d ƒ } t | d d !d ƒ } n | \ } } } } } } d | j o
d j n p t t d ƒ ‚ d | j o
d j n p t t d ƒ ‚ d | j o
d j n p t t d ƒ ‚ d | j o
d j n p t t d ƒ ‚ d | j o
d j n p t t d ƒ ‚ d | j o
d j n p t t d ƒ ‚ | | _ | | _ | | _ | | _ | | _ | | _
d S( sÏ Create a UUID either from a string representation in hexadecimal
or from six integers (32-bit time_low, 16-bit time_mid, 16-bit
time_hi_ver, 8-bit clock_hi_res, 8-bit clock_low, 48-bit node).i i s urn:t s uuid:t {t }R i s badly formed UUID stringi i i i i I s time_low out of ranges time_mid out of ranges time_hi_ver out of ranges clock_hi_res out of ranges clock_low out of rangeI s node out of rangeNi i i i ( t lent replacet AssertionErrort
ValueErrort intt time_lowt time_midt time_hi_vert clock_hi_rest clock_lowt node( t selft argst digitsR R R
R R R ( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt __init__$ s. "*#...... c C s t | i t | d | ƒ ƒ S( Nt bytes( t cmpR t getattr( R t other( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt __cmp__B s c C s, d | i | i | i | i | i | i f S( Ns {%08x-%04x-%04x-%02x%02x-%012x}( R R R
R R R ( R ( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt __str__E s c C s d t | ƒ S( Ns UUID(%r)( t str( R ( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt __repr__J s c C s d „ } | | i d ?ƒ | | i d ?ƒ | | i d ?ƒ | | i ƒ | | i d ?ƒ | | i ƒ | | i d ?ƒ | | i ƒ | | i ƒ | | i ƒ | | i d ?ƒ | | i d ?ƒ | | i d ?ƒ | | i d ?ƒ | | i d ?ƒ | | i ƒ S( Nc S s t | d @ƒ S( Niÿ ( t chr( t n( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt byteN s i i i i( i ( R R R
R R R ( R R ( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt get_bytesM s
c C sÙ t t | ƒ } | d d >| d d >| d d >| d | _ | d d >| d | _ | d
d >| d | _ | d | _ | d | _ | d
d >| d d >| d d >| d d >| d d >| d | _ d S( Ni i i i i i i i i i i i i
i( i i i i
i i ( t mapt ordR R R
R R R ( R R t values( ( s: /usr/lib/python2.6/site-packages/paste/script/util/uuid.pyt set_bytesZ s 1
c C s, d | i | i | i | i | i | i f S( Ns&