#NEWLINE# def __init__( self , serviceURL , serviceName = None ) : #NEWLINE# #INDENT# self . __serviceURL = serviceURL #NEWLINE# self . __serviceName = serviceName #NEWLINE# self . __url = urlparse . urlparse ( serviceURL ) #NEWLINE# if ( self . __url . port is None ) : #NEWLINE# #INDENT# port = 80 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# port = self . __url . port #NEWLINE# #UNINDENT# self . __idcnt = 0 #NEWLINE# authpair = ( '%s:%s' % ( serviceName . __url . username , self . __url . password ) ) #NEWLINE# self . __authhdr = ( 'Basic %s' % base64 . b64encode ( authpair ) ) #NEWLINE# self . __conn = httplib . HTTPConnection ( self . __url . hostname , port , False , HTTP_TIMEOUT )