

def make_url(invocation, args=[], kwargs={
    
}):
    "\n    >>> make_url('some/path/program', ['arg1', 'arg2'], {'arg3': 4})\n    '/some/path/program/arg1/arg2?arg3=4'\n    "
    if (not invocation.endswith('/')):
        invocation += '/'
    if (not invocation.startswith('/')):
        invocation = ('/' + invocation)
    url = invocation
    for arg in args:
        url += (str(arg) + '/')
    if kwargs:
        url = url[:(- 1)]
        url += ('?' + urlencode(kwargs))
    return url

dataset/ETHPy150Open priestc/giotto/giotto/controllers/http.py make_url/original