def URL2(a=None, c=None, r=None):
 application = controller = None
 if r:
  application = r.application
  controller = r.controller
 if a:
  application = a
 if c:
  controller = c
 if (not (application and controller)):
  raise SyntaxError, 'not enough information to build the url'
 url = ('/%s/%s' % (application, controller))
 return url

def URL2 ( a = None , c = None , r = None ) : application = controller = None if r : application = r . application controller = r . controller if a : application = a if c : controller = c if ( not ( application and controller ) ) : raise SyntaxError , 'not enough information to build the url' url = ( '/%s/%s' % ( application , controller ) ) return url
modified version of url from gluon/html .