#NEWLINE# def capabilities_url( self , service_url ) : #NEWLINE# #INDENT# 'Return a capabilities url\n        ' #NEWLINE# qs = [ ] #NEWLINE# if ( service_url . find ( '?' ) != ( - 1 ) ) : #NEWLINE# #INDENT# qs = cgi . parse_qsl ( service_url . split ( '?' ) [ 1 ] ) #NEWLINE# #UNINDENT# params = [ urlqs [ 0 ] for x in qs ] #NEWLINE# if ( 'service' not in params ) : #NEWLINE# #INDENT# qs . append ( ( 'service' , 'WFS' ) ) #NEWLINE# #UNINDENT# if ( 'request' not in params ) : #NEWLINE# #INDENT# qs . append ( ( 'request' , 'GetCapabilities' ) ) #NEWLINE# #UNINDENT# if ( 'version' not in params ) : #NEWLINE# #INDENT# qs . append ( ( 'version' , self . version ) ) #NEWLINE# #UNINDENT# urlqs = urlencode ( tuple ( qs ) ) #NEWLINE# return ( ( service_url . split ( '?' ) [ 0 ] + '?' ) + urlqs )