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

All Samples(10)  |  Call(5)  |  Derive(0)  |  Import(5)

        def parse_params(params, presets={}):
    if len(params) == 0:
        return None
    config, args = parseargs(params, defaults, 0, 1, presets=presets)
    if args:
        if config['responsefile'] or config['url']:
            raise ValueError('must have responsefile or url as arg or '
                             'parameter, not both')
        if os.path.isfile(args[0]):
            config['responsefile'] = args[0]
        else:
            try:
                urlparse(args[0])
            except:
                raise ValueError('bad filename or url')
            config['url'] = args[0]
    elif (config['responsefile'] == '') == (config['url'] == ''):
        raise ValueError('need responsefile or url, must have one, cannot '
                         'have both')
    return config
        


src/b/i/BitTornado-HEAD/btdownloadcurses.py   BitTornado(Download)
import hashlib
import threading
from BitTornado.download_bt1 import BT1Download, defaults, parse_params, \
    get_usage, get_response
from BitTornado.RawServer import RawServer
                 ))
            try:
                config = parse_params(params, configdefaults)
            except ValueError as e:
                d.error('error: {}\nrun with no args for parameter '

src/b/i/BitTornado-HEAD/btdownloadheadless.py   BitTornado(Download)
import hashlib
import threading
from BitTornado.download_bt1 import BT1Download, defaults, parse_params, \
    get_usage, get_response
from BitTornado.RawServer import RawServer
             'new default configuration (only for btdownloadheadless.py)'))
        try:
            config = parse_params(params, configdefaults)
        except ValueError as e:
            print 'error: {}\nrun with no args for parameter explanations' \

src/b/i/BitTornado-HEAD/btdownloadgui.py   BitTornado(Download)
from webbrowser import open_new
from StringIO import StringIO
from BitTornado.download_bt1 import BT1Download, parse_params, get_usage, \
    get_response
from BitTornado.RawServer import RawServer
        while 1:
            try:
                config = parse_params(params, configfile.config)
            except ValueError as e:
                d.error('error: ' + str(e) +

src/h/e/Herd-HEAD/murder_client.py   Herd(Download)
        pass
 
from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
from BitTornado.RawServer import RawServer, UPnP_ERROR
from random import seed
         "(only for btdownloadheadless.py)"))
        try:
            config = parse_params(params, configdefaults)
        except ValueError, e:
            print 'error: ' + str(e) + '\nrun with no args for parameter explanations'

src/f/r/FriendlyTorrent-HEAD/src/tornado/tftornado.py   FriendlyTorrent(Download)
    except:
        pass
from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
from BitTornado.RawServer import RawServer, UPnP_ERROR
from random import seed
        while 1:
            try:
                config = parse_params(params)
            except ValueError, e:
                print 'error: ' + str(e) + '\nrun with no args for parameter explanations'