'Generates a path (aka a \'relative URL\', a URL minus the host, scheme,
and port) for a named :app:`Pyramid` :term:`route configuration`.
This function accepts the same argument as
:meth:`pyramid.request.Request.route_url` and performs the same duty.
It just omits the host, port, and scheme information in the return
value; only the script_name, path, query parameters, and anchor data
are present in the returned string.
For example, if you\'ve defined a route named \'foobar\' with the path
``/{foo}/{bar}``, this call to ``route_path``::
request.route_path(\'foobar\', foo=\'1\', bar=\'2\')
Will return the string ``/1/2``.
.. note::
Calling ``request.route_path(\'route\')`` is the same as calling
``request.route_url(\'route\', _app_url=request.script_name)``.
:meth:`pyramid.request.Request.route_path` is, in fact,
implemented in terms of :meth:`pyramid.request.Request.route_url`
in just this way. As a result, any ``_app_url`` passed within the
``**kw`` values to ``route_path`` will be ignored.'

def route_path(self, route_name, *elements, **kw):

    kw['_app_url'] = self.script_name
    return self.route_url(route_name, *elements, **kw)
