All Samples(82) | Call(0) | Derive(0) | Import(82)
int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. If base is zero, the proper base is guessed based on the string content. If the argument is outside the integer range a long object will be returned instead.
src/b/r/braintree_python_examples-HEAD/tr_checkout_app_engine/web/wsgiserver/__init__.py braintree_python_examples(Download)
# If listening on the IPV6 any address ('::' = IN6ADDR_ANY),
# activate dual-stack. See http://www.cherrypy.org/ticket/871.
if (not isinstance(self.bind_addr, basestring)
and self.bind_addr[0] == '::' and family == socket.AF_INET6):
try:
self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
except (AttributeError, socket.error):
src/p/y/pycast-HEAD/trunk/pycast1/pycast.py pycast(Download)
# Todo: Need better handling of the tuple
# Todo: Must be better way to create mreq
# Todo: Need to find better Python version of getaddrinfo()
if (group[0][0] == socket.AF_INET6):
# IPv6 and IPv6 mreq creation
#
# Todo: Add support for :: address shortening
ifaddr = socket.INADDR_ANY
mreq = struct.pack("!LL", grpaddr, ifaddr)
if (group[0][0] == socket.AF_INET6):
# Set IPv6 socket options
self.socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
src/p/y/pycast-HEAD/pycast1/pycast.py pycast(Download)
# Todo: Need better handling of the tuple
# Todo: Must be better way to create mreq
# Todo: Need to find better Python version of getaddrinfo()
if (group[0][0] == socket.AF_INET6):
# IPv6 and IPv6 mreq creation
#
# Todo: Add support for :: address shortening
ifaddr = socket.INADDR_ANY
mreq = struct.pack("!LL", grpaddr, ifaddr)
if (group[0][0] == socket.AF_INET6):
# Set IPv6 socket options
self.socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
src/p/y/pycast-HEAD/trunk/pycast2/pycast.py pycast(Download)
# Todo: Need better handling of the tuple
# Todo: Must be better way to create mreq
# Todo: Need to find better Python version of getaddrinfo()
if (group[0][0] == socket.AF_INET6):
# IPv6 and IPv6 mreq creation
#
# Todo: Add support for :: address shortening
ifaddr = socket.INADDR_ANY
mreq = struct.pack("!LL", grpaddr, ifaddr)
if (group[0][0] == socket.AF_INET6):
# Set IPv6 socket options
self.socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
src/p/y/pycast-HEAD/pycast2/pycast.py pycast(Download)
# Todo: Need better handling of the tuple
# Todo: Must be better way to create mreq
# Todo: Need to find better Python version of getaddrinfo()
if (group[0][0] == socket.AF_INET6):
# IPv6 and IPv6 mreq creation
#
# Todo: Add support for :: address shortening
ifaddr = socket.INADDR_ANY
mreq = struct.pack("!LL", grpaddr, ifaddr)
if (group[0][0] == socket.AF_INET6):
# Set IPv6 socket options
self.socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
src/f/o/Forban-HEAD/lib/ext/cherrypy/wsgiserver/__init__.py Forban(Download)
# If listening on the IPV6 any address ('::' = IN6ADDR_ANY),
# activate dual-stack. See http://www.cherrypy.org/ticket/871.
if (not isinstance(self.bind_addr, basestring)
and self.bind_addr[0] == '::' and family == socket.AF_INET6):
try:
self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
except (AttributeError, socket.error):
src/s/h/shot-o-matic-HEAD/vendor/tornado-0.2/demos/wsgi/web/wsgiserver/__init__.py shot-o-matic(Download)
# If listening on the IPV6 any address ('::' = IN6ADDR_ANY),
# activate dual-stack. See http://www.cherrypy.org/ticket/871.
if (not isinstance(self.bind_addr, basestring)
and self.bind_addr[0] == '::' and family == socket.AF_INET6):
try:
self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
except (AttributeError, socket.error):
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/ftplib.py ironruby(Download)
def sendeprt(self, host, port):
'''Send a EPRT command with the current host and the given port number.'''
af = 0
if self.af == socket.AF_INET:
af = 1
if self.af == socket.AF_INET6:
af = 2
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/ftplib.py ironruby(Download)
def sendeprt(self, host, port):
'''Send a EPRT command with the current host and the given port number.'''
af = 0
if self.af == socket.AF_INET:
af = 1
if self.af == socket.AF_INET6:
af = 2
src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/ftplib.py jython(Download)
def sendeprt(self, host, port):
'''Send a EPRT command with the current host and the given port number.'''
af = 0
if self.af == socket.AF_INET:
af = 1
if self.af == socket.AF_INET6:
af = 2
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next