urllib ??

Rainer Malik rainer at cs.uu.nl
Mon Nov 4 04:51:19 EST 2002


hi ! 
i have a rather simple problem using urllib to POST something to a
server. my script looks like this:
def query_polyphen():

    d={ }
    d['InputQuerySequence']='>GGG \012 sequence'
    d['Var1']='C'
    d['InputQueryPosition']='282'
    d['Var2']='Y'
    d['Dbase3d']='pqs'
    d['SortByIde']='1'
    d['Map2Mismatch']='0'
    d['StructAllHits']='0'
    d['ContAllHits']='0'
    d['MinHitLen']='100'
    d['MinHitIde']='0.5'
    d['MaxHitGaps']='20'
    d['ContThresh']='6'
    d['.cgifields']='ContAllHits'
    d['.cgifields']='SortByIde'
    d['.cgifields']='StructAllHits'
    d['.cgifields']='Map2Mismatch'
    d['.cgifields']='Dbase3d'
    query=urllib.urlencode(d)
    url = 'http://tux.embl-heidelberg.de/ramensky/polyphen.cgi'
    results = urllib.urlopen(url,query).read()
    open ('/import/enterprise/home/rainer/test.html','w').write(results)


the problem i have is the following: when i call this script, i just
get the main HP of the server with the values filled in the correct
fields. but what i miss is the 'pressing of the submit button', so
that i will get the result from the server. i have no idea how this
should work.

Rainer



More information about the Python-list mailing list