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

All Samples(1295)  |  Call(1287)  |  Derive(0)  |  Import(8)
setdefaulttimeout(timeout)

Set the default timeout in floating seconds for new socket objects.
A value of None indicates that new socket objects have no timeout.
When the socket module is first imported, the default is None.

src/p/y/python-arecibo-HEAD/arecibo.py   python-arecibo(Download)
 
from urllib import urlencode
from urlparse import urlparse
from socket import gethostname, getdefaulttimeout, setdefaulttimeout
from email.Utils import formatdate
 
import smtplib
        data = self._data_encoded()
        oldtimeout = getdefaulttimeout()
        try:
            setdefaulttimeout(10)
            h.request("POST", url[2], data, headers)
 
            reply = h.getresponse()
            if reply.status != 200:
                raise ValueError, "%s (%s)" % (reply.read(), reply.status)
        finally:                                            
            setdefaulttimeout(oldtimeout)

src/c/l/clearwind.arecibo-0.4dev-r47/clearwind/arecibo/lib/arecibo.py   clearwind.arecibo(Download)
# -*- coding: utf-8 -*-
# Copyright ClearWind Consulting Ltd., 2008
# Under the BSD License, see LICENSE.TXT
from httplib import HTTPConnection
from urllib import urlencode
from urlparse import urlparse
from socket import gethostname, getdefaulttimeout, setdefaulttimeout
        data = self._data_encoded()
        oldtimeout = getdefaulttimeout()
        try:
            setdefaulttimeout(10)
            h.request("POST", url[2], data, headers)
 
            reply = h.getresponse()
            if reply.status != 200:
                raise ValueError, "%s (%s)" % (reply.read(), reply.status)
        finally:                                            
            setdefaulttimeout(oldtimeout)

src/p/u/pugbot-HEAD/pugapp.py   pugbot(Download)
from ConfigParser import SafeConfigParser
from os.path import isfile
from random import shuffle
from socket import setdefaulttimeout
from sys import stderr
import logging
 
class PugApp(object):
    def __init__(self, cfg_file="pugbot.cfg", log_file="pugbot.log"):
        colorama.init()
        setdefaulttimeout(5)

src/a/g/agtl-0.7.1.0-freerunner0/advancedcaching/openstreetmap.py   agtl(Download)
from os import path, mkdir, extsep, remove
from threading import Semaphore
from urllib import urlretrieve
from socket import setdefaulttimeout
setdefaulttimeout(30)
 
CONCURRENT_THREADS = 10

src/a/g/agtl-0.7.1.0-freerunner0/advancedcaching/downloader.py   agtl(Download)
    def __init__(self, username, password, cookiefile, login_callback):
        self.username = username
        self.password = password
        self.cookiefile = cookiefile
        self.logged_in = False
        from socket import setdefaulttimeout
        setdefaulttimeout(30)

src/i/t/itools-HEAD/pdf/pml.py   itools(Download)
# Import from the Standard Library
from cStringIO import StringIO
from copy import deepcopy
from socket import setdefaulttimeout
from os import close as close_fd
from types import FileType
from tempfile import mkdtemp, mkstemp
        css_file = get_abspath('html.css')
        self.add_css_from_file(css_file)
        self.anchor = []
        setdefaulttimeout(10)
        self.list_anchor = []
        self.tag_stack = []
        self.style_tag_stack = []

src/p/y/pyesp-HEAD/src/run_poc1.py   pyesp(Download)
 
from threading import Event, Lock, Semaphore
from sys import argv, stdout
from socket import setdefaulttimeout
import operator, random
 
### Functions ###
lock = Lock ()
 
# Socket timeout - 20 sec
setdefaulttimeout (SOCKET_TIMEOUT)
# Download 10 pages at the same time
sem = Semaphore (SAME_TIME_DOWNLOADS)
# Number of results in the "user-domain"

src/a/r/arecibo-0.1.2/arecibo/arecibo.py   arecibo(Download)
from urllib import urlencode
from urlparse import urlparse
try:
    from socket import gethostname, getdefaulttimeout, setdefaulttimeout
except ImportError:
    # App Engine doesn't have these
    # so here are a some replacements