473,385 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access Database Using Python

I'm writing a script to look through DNA sequences in a database and
select sequences I require. So far, my code looks like this for
authentication:

import os
import Bio.Clustalw
from Bio.Alphabet import IUPAC
import pdb
import sys
import os
import urllib
import urllib2
import urllib
userid = 'kmdawg'
password = 'kmdawgyeah'
location = 'index.html'
params = urllib.urlencode({'user': userid, 'password': password,
'request_uri': location})
f = urllib2.urlopen("http://www.gene-regulation.com/login?%s" % params)
print f.read()

When I run the program, I see the following:
______________

<HTML>
<HEAD>
<TITLE>Redirect</TITLE>
<META http-equiv="pragma" content="no-cache">
<META http-equiv="cache-control" content="no-cache">
<META http-equiv="expires" content="0">
<META http-equiv="refresh" content="1; URL=index.html"></HEAD><BODY
bgcolor="white">
<h1>Please stand by, you will be redirected
toindex.html...</h1></body></html>
________________

The code works as it is. How would I modify this script to display the
page
"http://www.gene-regulation.com/cgi-bin/pub/databases/transfac/getTF.cgi?AC=R00077"?
I can't figure out how to authenticate and then load a page, since the
page requires cookies for authentication.

Thanks.

Jul 19 '05 #1
0 993

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: David ROBERT | last post by:
Hello, I need to read data from a MS Access database. The program (reader) is installed on a linux box and is written in python langage. The database is MS Access 2002 installed on a Win XP box...
9
by: DD | last post by:
Hello, Could anyone please help me?? Is there somebody who could explain me how to make a connection to a access database with a python cgi script. I would like to use common sql commands in my...
1
by: Uggen Kristin T | last post by:
For the first time, I am trying to program python in a windows-environment, and now I am having some trouble with combining python and MS Access... This is what I want to do: A MS Access...
0
by: asdf sdf | last post by:
wondering what python resources might be available for python-based legacy system access, particularly to MVS, DB2 and Adabas. What additional pieces might be needed to implement this access? ...
4
by: Edward Diener | last post by:
Version 2.0 of the Python database API was written over 5 years ago, in 1999. While it has been used successfully by many implementations, there is no generic access into the data dictionary of...
1
by: DD | last post by:
Hello, Could anyone please help me?? Is there somebody who could explain me how to make a connection to a access database with a python cgi script. I would like to use common sql commands in my...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
2
by: infotechsys | last post by:
I googled for the answer but all the answer seem to imply that you have to have Access installed on your system. I have a file that was created using Access and I want develop a Python script to...
3
by: Rajendran | last post by:
Hi all, I've installed pyodbc module to access my database (MS Access). I've setup a User level DSN to the database.mdb file. When I run my python code in the command prompt it is retrieving the...
1
by: bg_ie | last post by:
Hi there, My company uses a very buggy and poorly designed msaccess database which we use to store information from the components we use, to test results. The database has been added to bit by...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.