def get_wms(version='1.1.1', type_name=None):
 url = (GEOSERVER_URL + ('%s/wms?request=getcapabilities' % type_name.replace(':', '/')))
 return WebMapService(url, version=version, username=GEOSERVER_USER, password=GEOSERVER_PASSWD)

def get_wms ( version = '1.1.1' , type_name = None ) : url = ( GEOSERVER_URL + ( '%s/wms?request=getcapabilities' % type_name . replace ( ':' , '/' ) ) ) return WebMapService ( url , version = version , username = GEOSERVER_USER , password = GEOSERVER_PASSWD )
function to return an owslib wms object .