Home | History | Annotate | Download | only in oopif

Lines Matching defs:Params

9 Params class for a description of the parameters.
62 class Params(object):
65 # Basic params:
106 def generate_host(rand, params):
112 if params.pattern:
113 host = params.pattern[params.pattern_pos]
114 params.pattern_pos = (params.pattern_pos + 1) % len(params.pattern)
116 host = rand.randint(1, apply_jitter(rand, params.jitter, params.nsites))
145 def make_src(scheme, netloc, path, params):
146 """Constructs the src url that will recreate the given params."""
149 return '%(scheme)s://%(netloc)s%(path)s?%(params)s' % {
153 'params': urllib.urlencode(params.__dict__),
157 def make_iframe_html(urlpath, params):
159 if (params.depth <= 0):
163 rand.seed(params.seed)
166 netloc_paths[0] = generate_host(rand, params)
168 width = apply_jitter(rand, params.size_jitter, params.width)
169 height = apply_jitter(rand, params.size_jitter, params.height)
172 urlpath.path, params),
187 params = Params(urlparse.parse_qs(urlpath.query))
190 rand.seed(params.seed)
193 for frame in xrange(0, apply_jitter(rand, params.jitter, params.nframes)):
196 iframe_params = copy.copy(params)
197 iframe_params.depth = params.depth - 1
201 iframe_params.seed = params.seed + (frame + 1) * (
202 1000000 + params.depth + 333)
204 template_params = dict(params.__dict__)
209 'url': make_src(urlpath.scheme, urlpath.netloc, urlpath.path, params),