def __build_url_opener(self, uri):

        # Create an OpenerDirector with support
        # for Basic HTTP Authentication...
        auth_handler = urllib2.HTTPBasicAuthHandler()
        auth_handler.add_password(None,
                                  uri,
                                  self.client_id,
                                  self.client_secret)
        opener = urllib2.build_opener(auth_handler)
        return opener

    # -------------------------------------------------------------------------
Utility function to load messages from a local filename to a queue
dataset/ETHPy150Open sahana/eden/modules/s3oauth.py/GooglePlusAccount.__build_url_opener--crossover with--dataset/ETHPy150Open darcyliu/storyboard/boto/sqs/queue.py/Queue.load_from_filename