Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
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/m/b/mbed-tools-0.1.14/workspace_tools/host_tests/example/MulticastReceive.py   mbed-tools(Download)
mreq = struct.pack("4sl", socket.inet_aton(MCAST_GRP), socket.INADDR_ANY)
 
sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
 
while True:

src/s/w/swiftarm-HEAD/tribler/Tribler/UPnP/ssdp/ssdpdaemon.py   swiftarm(Download)
                           socket.INADDR_ANY)
        self._mcast_recv_sock.setsockopt(socket.IPPROTO_IP, 
                                         socket.IP_ADD_MEMBERSHIP, mreq)
        self._mcast_recv_sock.setsockopt(socket.IPPROTO_IP, 
                                         socket.IP_MULTICAST_TTL, _MCAST_TTL)

src/m/d/mdns-browser-HEAD/src/mdns_browser/mdns/__init__.py   mdns-browser(Download)
            self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF,
                socket.inet_aton(self.intf) + socket.inet_aton('0.0.0.0'))
            self.socket.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP,
                socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0'))
        else: # IPv6

src/c/p/cpython-HEAD/Tools/demo/mcast.py   cpython(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/l/i/litter-HEAD/src/litter.py   litter(Download)
        if len(intfs) > 0:
            for intf in intfs:
                s.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP,
                    socket.inet_aton(addr) + socket.inet_aton(intf))
        else:
            # let the OS choose default interface for mcast
            s.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP,
            # hack for socialvpn
            try:
                s.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP,
                    socket.inet_aton(addr) + socket.inet_aton('172.31.0.2'))
            except Exception as ex:

src/s/t/static-python-HEAD/Tools/demo/mcast.py   static-python(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/p/y/pytaint-HEAD/Python-2.7.5-pytaint/Demo/sockets/mcast.py   pytaint(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/p/y/Py2crazy-HEAD/Python-2.7.5/Demo/sockets/mcast.py   Py2crazy(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/p/y/PyCPython-HEAD/Python-2.7.1/Demo/sockets/mcast.py   PyCPython(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/p/y/python2.7-mod-HEAD/Demo/sockets/mcast.py   python2.7-mod(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next