• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(23)  |  Call(0)  |  Derive(0)  |  Import(23)
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/p/y/pygmsn-HEAD/src/conexion/papylib/gnet/constants.py   pygmsn(Download)
#
 
"""Constants used in GNet."""
from socket import AF_INET, AF_INET6, \
    SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET
try:
    from socket import AF_UNIX

src/p/a/papyon-HEAD/papyon/gnet/constants.py   papyon(Download)
#
 
"""Constants used in GNet."""
from socket import AF_INET, AF_INET6, \
    SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET
try:
    from socket import AF_UNIX

src/l/i/limousine-HEAD/pymsn/gnet/constants.py   limousine(Download)
#
 
"""Constants used in GNet."""
from socket import AF_INET, AF_INET6, \
    SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET
try:
    from socket import AF_UNIX

src/p/s/ps3enc-HEAD/guis/terminal.py   ps3enc(Download)
from __future__ import print_function
from socket import socket,AF_INET,SOCK_DGRAM,timeout
import threading
import sys
from os.path import basename
 
def hello_world():
    print("Hello World")
 
def do_terminal_gui(sock=None,hostname="localhost",port=36134):
    if not sock:
        sock=socket(AF_INET,SOCK_DGRAM)

src/p/s/ps3enc-HEAD/ffmpegbase2.py   ps3enc(Download)
    import threading
    from time import time
    from subprocess import Popen,PIPE,STDOUT
    from socket import socket,AF_INET,SOCK_DGRAM,timeout
except ImportError as err:
    print(err.args)
 
            self._socket = socket_
        else:
            self._address = (str(host),int(port))
            self._socket = socket(AF_INET, SOCK_DGRAM)
            self._socket.connect(self._address)
 
    def add_file(self,file):
    (options, args) = p.parse_args()
    ff=Ffmpeg(args, output_dir=options.dir, printcmd=True)
    ff.start()
    sock = socket(AF_INET,SOCK_DGRAM)
    sock.bind(("localhost",36134))
    sock.settimeout(15)
    old_len = 0

src/b/u/buteo-HEAD/plugins/network.py   buteo(Download)
    Copyright (c) 2009 Christian Hans
    Licensed under the terms of the GPL v2
"""
from socket import socket, SOCK_DGRAM, AF_INET, inet_ntoa
from fcntl import ioctl
from struct import pack, unpack
from array import array
    def _ifaces(self):
        max_possible = 128  # arbitrary. raise if needed.
        bytes = max_possible * 32
        s = socket(AF_INET, SOCK_DGRAM)
        names = array('B', '\0' * bytes)
        outbytes = unpack('iL', ioctl(
            s.fileno(),

src/f/l/flowgrid-HEAD/trunk/lib/ZSI/wstools/logging.py   flowgrid(Download)
def sendUDP(url, outputStr):
    from socket import socket, AF_INET, SOCK_DGRAM
    idx1 = url.find('://') + 3; idx2 = url.find('/', idx1)
    if idx2 < idx1: idx2 = len(url)
    netloc = url[idx1:idx2]
    host,port = (netloc.split(':')+[80])[0:2]
    socket(AF_INET, SOCK_DGRAM).sendto( outputStr, (host,int(port)), )

src/l/v/lvs-cwol-HEAD/client.py   lvs-cwol(Download)
 
# Fugly way to grab our ip. A better way would be to take our initial
# connect and get it from there. I don't know how (yet).
from socket import socket, SOCK_DGRAM, AF_INET
ugly = socket(AF_INET, SOCK_DGRAM)
ugly.connect((directorIP, int(directorPort)))
myIP = ugly.getsockname()[0]

src/f/l/flowgrid-HEAD/lib/ZSI/wstools/logging.py   flowgrid(Download)
def sendUDP(url, outputStr):
    from socket import socket, AF_INET, SOCK_DGRAM
    idx1 = url.find('://') + 3; idx2 = url.find('/', idx1)
    if idx2 < idx1: idx2 = len(url)
    netloc = url[idx1:idx2]
    host,port = (netloc.split(':')+[80])[0:2]
    socket(AF_INET, SOCK_DGRAM).sendto( outputStr, (host,int(port)), )

src/b/e/berrymq-0.3/berrymq/adapter/growl/__init__.py   berrymq(Download)
# -*- coding: utf-8 -*-
 
from . import netgrowl
import berrymq
from socket import AF_INET, SOCK_DGRAM, socket
 
class GrowlAdapter(object):
    def __init__(self, id_filter, application_name="berryMQ"):
        berrymq.regist_method(id_filter, self.listener)
        self.addr = ("localhost", netgrowl.GROWL_UDP_PORT)
        self.socket = socket(AF_INET,SOCK_DGRAM)

  1 | 2 | 3  Next