PEATDB/DNAtool/primer_database.py
def login_MWG(self,URL=None,event=None):
        """Send a login attempt to the MWG server and return the html file"""
        self.HOST='enzyme.ucd.ie'
        self.PORT=80
        self.URL = 'http://www.someserver.com/somepath/someprotectedpage.html'
        import urllib2
        req = urllib2.Request(self.URL)
        try:
            handle = urllib2.urlopen(req)
        except IOError, e:
            if hasattr(e, 'code'):
                if e.code != 401:
                    print 'We got a 401 error'
                    print e.code
                else:
                    print e.headers
                    print e.headers['www-authenticate']

        return
Send a login attempt to the MWG server and return the html file
Send a login attempt to the MWG server and return the html file
Send a login attempt to the MWG server and return the html file
def login_MWG(self,URL=None,event=None):
        self.HOST='enzyme.ucd.ie'
        self.PORT=80
        self.URL = 'http://www.someserver.com/somepath/someprotectedpage.html'
        import urllib2
        req = urllib2.Request(self.URL)
        try:
            handle = urllib2.urlopen(req)
        except IOError, e:
            if hasattr(e, 'code'):
                if e.code != 401:
                    print 'We got a 401 error'
                    print e.code
                else:
                    print e.headers
                    print e.headers['www-authenticate']
        return
def login_MWG ( self , URL = None , event = None ) : self . HOST = 'enzyme.ucd.ie' self . PORT = 80 self . URL = 'http://www.someserver.com/somepath/someprotectedpage.html' import urllib2 req = urllib2 . Request ( self . URL ) try : handle = urllib2 . urlopen ( req ) except IOError , e : if hasattr ( e , 'code' ) : if e . code != 401 : print 'We got a 401 error' print e . code else : print e . headers print e . headers [ 'www-authenticate' ] return
Send a login attempt to the MWG server and return the html file
Send a login attempt to the MWG server and return the html file
"""Send a login attempt to the MWG server and return the html file"""
self
URL
event