Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/p/y/pyroute2-HEAD/pyroute2/netlink/iproute.py   pyroute2(Download)
from pyroute2.netlink import Marshal
from pyroute2.netlink import NetlinkSocket
from pyroute2.netlink import NLMSG_ERROR
from pyroute2.netlink import NLM_F_ATOMIC
from pyroute2.netlink import NLM_F_ROOT
        elif family == AF_INET6:
            msg['attrs'] = [['IFA_ADDRESS', address]]
        terminate = lambda x: x['header']['type'] == NLMSG_ERROR
        return self.nlm_request(msg,
                                msg_type=command,

src/p/y/pyroute2-0.2.8/pyroute2/netlink/iproute.py   pyroute2(Download)
from pyroute2.netlink import Marshal
from pyroute2.netlink import NetlinkSocket
from pyroute2.netlink import NLMSG_ERROR
from pyroute2.netlink import NLM_F_ATOMIC
from pyroute2.netlink import NLM_F_ROOT
        elif family == AF_INET6:
            msg['attrs'] = [['IFA_ADDRESS', address]]
        terminate = lambda x: x['header']['type'] == NLMSG_ERROR
        return self.nlm_request(msg,
                                msg_type=command,

src/l/n/lnst-1/lnst/Common/NetUtils.py   lnst(Download)
from pyroute2.netlink import NLM_F_DUMP
from pyroute2.netlink import NLMSG_DONE
from pyroute2.netlink import NLMSG_ERROR
from pyroute2.netlink.generic import NETLINK_ROUTE
from pyroute2.netlink.iproute import MarshalRtnl
        parts = marshal.parse(response)
        for part in parts:
            if part["header"]["type"] in [NLMSG_DONE, NLMSG_ERROR]:
                finished = True
                continue

src/p/y/pyroute2-HEAD/tests/test_lnst.py   pyroute2(Download)
        from pyroute2.netlink import NLM_F_MATCH
        from pyroute2.netlink import NLMSG_DONE
        from pyroute2.netlink import NLMSG_ERROR
        from pyroute2.netlink.iproute import RTM_GETLINK
        from pyroute2.netlink.iproute import RTM_NEWLINK
        assert NLM_F_DUMP == (NLM_F_ROOT | NLM_F_MATCH)
        assert NLMSG_DONE == 0x3
        assert NLMSG_ERROR == 0x2
        assert RTM_GETLINK == 0x12
        assert RTM_NEWLINK == 0x10