Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
idna / lib / python2.7 / site-packages / netaddr / core.pyc
Size: Mime:
ó
®‹EYc@s9dZddlZddlZddlmZmZejdkZ	dZ
ZdZZ
dZZdefd	„ƒYZd
efd„ƒYZdefd
„ƒYZydZejƒd„ZWnek
rÜd„ZnXdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(s6Common code shared between various netaddr sub modulesiÿÿÿÿN(t	_callablet_iter_dict_keystbigiiitAddrFormatErrorcBseZdZRS(sO
    An Exception indicating a network address is not correctly formatted.
    (t__name__t
__module__t__doc__(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyRstAddrConversionErrorcBseZdZRS(s^
    An Exception indicating a failure to convert between address types or
    notations.
    (RRR(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR#stNotRegisteredErrorcBseZdZRS(s\
    An Exception indicating that an OUI or IAB was not found in the IEEE
    Registry.
    (RRR(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR+si*cCs
|jƒS(s‡
        :param int_val: an unsigned integer.

        :return: the minimum number of bits needed to represent value provided.
        (t
bit_length(tint_val((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pytnum_bits7scCs+d}x|r&|d7}|dL}q	W|S(s‡
        :param int_val: an unsigned integer.

        :return: the minimum number of bits needed to represent value provided.
        ii((R
tnumbits((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR@s
	
t
SubscribercBseZdZd„ZRS(sK
    An abstract class defining the interface expected by a Publisher.
    cCstdƒ‚dS(sµ
        A callback method used by a Publisher to notify this Subscriber about
        updates.

        :param data: a Python object containing data provided by Publisher.
        scannot invoke virtual method!N(tNotImplementedError(tselftdata((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pytupdateRs(RRRR(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR
Mst
PrettyPrintercBs)eZdZejed„Zd„ZRS(sÅ
    A concrete Subscriber that employs the pprint in the standard library to
    format all data from updates received, writing them to a file-like
    object.

    Useful as a debugging aid.
    cCs||_||_dS(sô
        Constructor.

        :param fh: a file-like object to write updates to.
            Default: sys.stdout.


        :param write_eol: if ``True`` this object will write newlines to
            output, if ``False`` it will not.
        N(tfht	write_eol(RRR((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyt__init__es	cCs9|jjtj|ƒƒ|jr5|jjdƒndS(sµ
        A callback method used by a Publisher to notify this Subscriber about
        updates.

        :param data: a Python object containing data provided by Publisher.
        s
N(Rtwritet_pprinttpformatR(RR((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyRss	(RRRt_syststdouttTrueRR(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR\st	PublishercBs2eZdZd„Zd„Zd„Zd„ZRS(s²
    A 'push' Publisher that maintains a list of Subscriber objects notifying
    them of state changes by passing them update data when it encounter events
    of interest.
    cCs
g|_dS(tConstructorN(tsubscribers(R((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR†scCsZt|dƒrFttdƒƒrF||jkrV|jj|ƒqVntd|ƒ‚dS(s
        Add a new subscriber.

        :param subscriber: a new object that implements the Subscriber object
            interface.
        Rssubscriber.updates'%r does not support required interface!N(thasattrRtevalRtappendt	TypeError(Rt
subscriber((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pytattachŠs!cCs,y|jj|ƒWntk
r'nXdS(s–
        Remove an existing subscriber.

        :param subscriber: a new object that implements the Subscriber object
            interface.
        N(Rtremovet
ValueError(RR#((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pytdetach—s
cCs%x|jD]}|j|ƒq
WdS(s
        Send update data to to all registered Subscribers.

        :param data: the data to be passed to each registered Subscriber.
        N(RR(RRR#((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pytnotify£s(RRRRR$R'R((((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyRs
		
	t
DictDotLookupcBs2eZdZd„Zd„Zd„Zd„ZRS(s
    Creates objects that behave much like a dictionaries, but allow nested
    key access using object '.' (dot) lookups.

    Recipe 576586: Dot-style nested lookups over dictionary based data
    structures - http://code.activestate.com/recipes/576586/

    cCsÉxÂ|D]º}t||tƒr:t||ƒ|j|<qt||ttfƒr°g}xD||D]8}t|tƒr|jt|ƒƒqd|j|ƒqdW||j|<q|||j|<qWdS(N(t
isinstancetdictR)t__dict__tlistttupleR!(Rtdtktltv((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR·s
cCs||jkr|j|SdS(N(R,(Rtname((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyt__getitem__ÆscCs
t|jƒS(N(RR,(R((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyt__iter__ÊscCstj|jƒS(N(RRR,(R((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyt__repr__Ís(RRRRR4R5R6(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyR)­s
			(RtsysRtpprintRtnetaddr.compatRRt	byteordertBIG_ENDIAN_PLATFORMtPt	INET_PTONtZtZEROFILLtNtNOHOSTt	ExceptionRRRtaR	RtAttributeErrortobjectR
RRR)(((sA/home/tvault/.virtenv/lib/python2.7/site-packages/netaddr/core.pyt<module>s(







#.