Ńň
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 s6 t | d j oŃ | d i d d i d d } | i d d i d d i d 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 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 i i i i i N( t lent replacet 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&