JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў fMWc@sdZdZddddg\ZZZZeZeZ Gddde Z dd Z d d Z d d ZddZeZZZyDddlZddlZxddgD]yZyejejjeZWn wYnXeedrejZneedr+ejZeek r(PnnqWddlZejdkrddl Z ee j!j"j#dddkreZZnnyej$j%ZWneZYnXe&ede&edeZWnYnXddZ'ddZ(dd Z)ea*d!d"Z+ea,eed#d$Z-d%d&Z.d'd(Z/d)d*Z0e d+Z1e d,Z2e d-Z3e d.Z4dS(/uQUUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() or uuid4(). Note that uuid1() may compromise privacy since it creates a UUID containing the computer's network address. uuid4() creates a random UUID. Typical usage: >>> import uuid # make a UUID based on the host ID and current time >>> uuid.uuid1() # doctest: +SKIP UUID('a8098c1a-f86e-11da-bd1a-00112444be1e') # make a UUID using an MD5 hash of a namespace UUID and a name >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org') UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e') # make a random UUID >>> uuid.uuid4() # doctest: +SKIP UUID('16fd2706-8baf-433b-82eb-8c7fada847da') # make a UUID using a SHA-1 hash of a namespace UUID and a name >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org') UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d') # make a UUID from a string of hex digits (braces and hyphens ignored) >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}') # convert a UUID to a string of hex digits in standard form >>> str(x) '00010203-0405-0607-0809-0a0b0c0d0e0f' # get the raw 16 bytes of the UUID >>> x.bytes b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f' # make a UUID from a 16-byte string >>> uuid.UUID(bytes=x.bytes) UUID('00010203-0405-0607-0809-0a0b0c0d0e0f') uKa-Ping Yee ureserved for NCS compatibilityuspecified in RFC 4122u$reserved for Microsoft compatibilityureserved for future definitioncBs|EeZdZdZd8d8d8d8d8d8ddZddZddZdd Zd d Z d d Z ddZ ddZ ddZ ddZddZddZeddZeddZeddZed d!Zed"d#Zed$d%Zed&d'Zed(d)Zed*d+Zed,d-Zed.d/Zed0d1Zed2d3Zed4d5Zed6d7Z d8S(9uUUIDuInstances of the UUID class represent UUIDs as specified in RFC 4122. UUID objects are immutable, hashable, and usable as dictionary keys. Converting a UUID to a string with str() yields something in the form '12345678-1234-1234-1234-123456789abc'. The UUID constructor accepts five possible forms: a similar string of hexadecimal digits, or a tuple of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and 48-bit values respectively) as an argument named 'fields', or a string of 16 bytes (with all the integer fields in big-endian order) as an argument named 'bytes', or a string of 16 bytes (with the first three fields in little-endian order) as an argument named 'bytes_le', or a single 128-bit integer as an argument named 'int'. UUIDs have these read-only attributes: bytes the UUID as a 16-byte string (containing the six integer fields in big-endian byte order) bytes_le the UUID as a 16-byte string (with time_low, time_mid, and time_hi_version in little-endian byte order) fields a tuple of the six integer fields of the UUID, which are also available as six individual attributes and two derived attributes: time_low the first 32 bits of the UUID time_mid the next 16 bits of the UUID time_hi_version the next 16 bits of the UUID clock_seq_hi_variant the next 8 bits of the UUID clock_seq_low the next 8 bits of the UUID node the last 48 bits of the UUID time the 60-bit timestamp clock_seq the 14-bit sequence number hex the UUID as a 32-character hexadecimal string int the UUID as a 128-bit integer urn the UUID as a URN as specified in RFC 4122 variant the UUID variant (one of the constants RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE) version the UUID version number (1 through 5, meaningful only when the variant is RFC_4122) c Cs|||||gjddkr3tdn|dk r|jddjdd}|jdjdd}t|dkrtd nt|d }n|dk r9t|d krtd ntt |d dtt |dd tt |d d|dd}n|dk rt|d krftdnt |tst t |tdd t |d }n|dk r%t|d krtdn|\}}} } } } d |kod'knstdnd |ko.d(knsBtdnd | koYd)knsmtdnd | kod*knstdnd | kod+knstdnd | kod,knstdn| d>| B} |d>|d>B| d>B| d>B| B}n|dk r_d |koHd-kns_tdq_n|dk rd|kod knstd!n|d/M}|d0O}|d2M}||d%>O}n||jd&|jd>B|jBS(Nii0i (utime_hi_versionutime_midutime_low(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyutimesu UUID.timecCs|jd@d>|jBS(Ni?i(uclock_seq_hi_variantu clock_seq_low(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyu clock_seqsuUUID.clock_seqcCs |jd@S(Nl(uint(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyunodesu UUID.nodecCs d|jS(Nu%032x(uint(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyuhex!suUUID.hexcCsdt|S(Nu urn:uuid:(ustr(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyuurn%suUUID.urncCs;|jd@stS|jd@s"tS|jd@s3tStSdS(Nii0i@i lll(uintu RESERVED_NCSuRFC_4122uRESERVED_MICROSOFTuRESERVED_FUTURE(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyuvariant)s   u UUID.variantcCs(|jtkr$t|jd?d@SdS(NiLi(uvariantuRFC_4122uint(uself((u)/opt/alt/python33/lib64/python3.3/uuid.pyuversion4su UUID.versionN(!u__name__u __module__u __qualname__u__doc__uNoneu__init__u__eq__u__ne__u__lt__u__gt__u__le__u__ge__u__hash__u__int__u__repr__u __setattr__u__str__upropertyubytesubytes_leufieldsutime_lowutime_midutime_hi_versionuclock_seq_hi_variantu clock_seq_lowutimeu clock_sequnodeuhexuurnuvariantuversion(u __locals__((u)/opt/alt/python33/lib64/python3.3/uuid.pyuUUID8s:. P            uUUIDc CsGddl}ddl}|j|}|dkrm|jjd }|j|d|}|dkrmdSnyd||f}|j|} x| D]} | jj} xot t | D][} | | |kry't | || j dddSWqt tfk rYqXqqWqWWdQXWntk rBYnXdS( Niu/sbinu /usr/sbinupathuLC_ALL=C %s %s 2>/dev/nullu:ui(u/sbinu /usr/sbin(uosushutiluwhichuNoneupathsepujoinupopenuloweruspliturangeulenuintureplaceu ValueErroru IndexErroruIOError( ucommanduargsuhw_identifiersu get_indexuosushutilu executableupathucmdupipeulineuwordsui((u)/opt/alt/python33/lib64/python3.3/uuid.pyu _find_mac:s*   $ u _find_maccCsx9dD]1}td|ddgdd}|r|SqWd d l}|j|j}td d |gd d}|r|Stdddgdd}|r|Sd S(u5Get the hardware address on Unix by running ifconfig.uu-au-avuifconfiguhwaddruethercSs|dS(Ni((ui((u)/opt/alt/python33/lib64/python3.3/uuid.pyu^su#_ifconfig_getnode..iNuarpu-ancSsdS(Nii((ui((u)/opt/alt/python33/lib64/python3.3/uuid.pyufsulanscanu-aiulan0cSsdS(Ni((ui((u)/opt/alt/python33/lib64/python3.3/uuid.pyuks(uu-au-av(u _find_macusocketu gethostbynameu gethostnameuNone(uargsumacusocketuip_addr((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_ifconfig_getnodeYs ! u_ifconfig_getnodec CsCddl}ddl}dddg}yQddl}|jd}|jjj|d|jd|jj dWnYnXx|D]}zy&|j |j j |dd }Wnt k rwYn\XxX|D]P}|jd djj}|jd |rt|jd ddSqWWd|jXqWdS(u<Get the hardware address on Windows by running ipconfig.exe.iNuuc:\windows\system32uc:\winnt\system32i,umbcsuipconfigu /allu:iu&([0-9a-f][0-9a-f]-){5}[0-9a-f][0-9a-f]u-ii(uosureuctypesucreate_string_bufferuwindllukernel32uGetSystemDirectoryAuinsertuvalueudecodeupopenupathujoinuIOErrorusplitustripulowerumatchuintureplaceuclose( uosureudirsuctypesubufferudirupipeulineuvalue((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_ipconfig_getnodeqs&   &  !u_ipconfig_getnodecCsddl}ddl}|j}|j|_|j|_}|j|j|dkrfdS|j xt |j D] }|j |j |_t|j||_|j|dkrqn|j |j|_t|j||_djd|_|j|_}|j|dkr9qn|j |j}|dd>|dd>|dd >|d d>|d d >|d SWdS(utGet the hardware address on Windows using NetBIOS calls. See http://support.microsoft.com/kb/118623 for details.iNu*ii(ii iiiiii(u win32wnetunetbiosuNCBuNCBENUMuCommandu LANA_ENUMuBufferu_packuNetbiosu_unpackurangeulengthuResetuNCBRESETuordulanauLana_numuNCBASTATuljustuCallnameuADAPTER_STATUSuadapter_address(u win32wnetunetbiosuncbuadaptersuiustatusubytes((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_netbios_getnodes0          u_netbios_getnodeiNuuuiducuuuid_generate_randomuuuid_generate_timeudarwinu.i uUuidCreateSequentialu UuidCreatecCs2tjd}t|tdt|jjS(u.Get the hardware address on Unix using ctypes.iubytes(uctypesucreate_string_bufferu_uuid_generate_timeuUUIDubytes_urawunode(u_buffer((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_unixdll_getnodes u_unixdll_getnodecCs>tjd}t|dkr:tdt|jjSdS(u1Get the hardware address on Windows using ctypes.iiubytesN(uctypesucreate_string_bufferu _UuidCreateuUUIDubytes_urawunode(u_buffer((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_windll_getnodesu_windll_getnodecCs ddl}|jdddBS(uCGet a random node ID, with eighth bit set as suggested by RFC 4122.iNii0ll(urandomu randrange(urandom((u)/opt/alt/python33/lib64/python3.3/uuid.pyu_random_getnodes u_random_getnodec Cstdk rtSddl}|jdkr=tttg}n ttg}x@|t gD]1}y |aWn wWYnXtdk rWtSqWWdS(u3Get the hardware address as a 48-bit positive integer. The first time this runs, it may launch a separate program, which could be quite slow. If all attempts to obtain the hardware address fail, we choose a random 48-bit number with its eighth bit set to 1 as recommended in RFC 4122. iNuwin32( u_nodeuNoneusysuplatformu_windll_getnodeu_netbios_getnodeu_ipconfig_getnodeu_unixdll_getnodeu_ifconfig_getnodeu_random_getnode(usysugettersugetter((u)/opt/alt/python33/lib64/python3.3/uuid.pyugetnodes     ugetnodec CsWtrQ||kodknrQtjd}t|tdt|jSddl}t|jd}t|dd}t dk r|t krt d}n|a |dkrddl }|j d}n|d @}|d ?d @}|d ?d@} |d@} |d?d@} |dkr2t }ntd||| | | |fddS(uGenerate a UUID from a host ID, sequence number, and the current time. If 'node' is not given, getnode() is used to obtain the hardware address. If 'clock_seq' is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen.iubytesiNgeAidl@'Hw iili ii0iiii?ufieldsuversioni@( u_uuid_generate_timeuNoneuctypesucreate_string_bufferuUUIDubytes_urawutimeuintu_last_timestampurandomu randrangeugetnode( unodeu clock_sequ_bufferutimeu nanosecondsu timestampurandomutime_lowutime_midutime_hi_versionu clock_seq_lowuclock_seq_hi_variant((u)/opt/alt/python33/lib64/python3.3/uuid.pyuuuid1 s,"         uuuid1cCsOddlm}||jt|dj}td|ddddS( uAGenerate a UUID from the MD5 hash of a namespace UUID and a name.i(umd5uutf-8ubytesNiuversioni(uhashlibumd5ubytesudigestuUUID(u namespaceunameumd5uhash((u)/opt/alt/python33/lib64/python3.3/uuid.pyuuuid3-s"uuuid3c str5tjd}t|tdt|jSy,ddl}td|jdddSWnLddltfddt dD}td|ddSYnXdS( uGenerate a random UUID.iubytesiNuversionic3s|]}jdVqdS(iN(u randrange(u.0ui(urandom(u)/opt/alt/python33/lib64/python3.3/uuid.pyu Bsuuuid4..( u_uuid_generate_randomuctypesucreate_string_bufferuUUIDubytes_urawuosuurandomurandomurange(u_bufferuosubytes((urandomu)/opt/alt/python33/lib64/python3.3/uuid.pyuuuid43s    %uuuid4cCsOddlm}||jt|dj}td|ddddS( uCGenerate a UUID from the SHA-1 hash of a namespace UUID and a name.i(usha1uutf-8ubytesNiuversioni(uhashlibusha1ubytesudigestuUUID(u namespaceunameusha1uhash((u)/opt/alt/python33/lib64/python3.3/uuid.pyuuuid5Es"uuuid5u$6ba7b810-9dad-11d1-80b4-00c04fd430c8u$6ba7b811-9dad-11d1-80b4-00c04fd430c8u$6ba7b812-9dad-11d1-80b4-00c04fd430c8u$6ba7b814-9dad-11d1-80b4-00c04fd430c8(5u__doc__u __author__u RESERVED_NCSuRFC_4122uRESERVED_MICROSOFTuRESERVED_FUTUREuintuint_ubytesubytes_uobjectuUUIDu _find_macu_ifconfig_getnodeu_ipconfig_getnodeu_netbios_getnodeuNoneu_uuid_generate_randomu_uuid_generate_timeu _UuidCreateuctypesu ctypes.utilulibnameuCDLLuutilu find_libraryulibuhasattruuuid_generate_randomuuuid_generate_timeusysuplatformuosuunameureleaseusplituwindllurpcrt4ugetattru_unixdll_getnodeu_windll_getnodeu_random_getnodeu_nodeugetnodeu_last_timestampuuuid1uuuid3uuuid4uuuid5u NAMESPACE_DNSu NAMESPACE_URLu NAMESPACE_OIDuNAMESPACE_X500(((u)/opt/alt/python33/lib64/python3.3/uuid.pyu-sh    !     (       #