473,560 Members | 2,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.urlencod e({'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:

<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
"http://www.gene-regulation.com/cgi-bin/pub/databases/transfac/getTF.cgi?AC=R0 0077"?
I can't figure out how to authenticate and then load a page, since the
page requires cookies for authentication.


Jul 19 '05 #1
0 1000

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

Similar topics

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 networked with the linux box. Is it possible for python/linux to read data from MS Access Database ?
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 python scripts as I can with MySQLdb. But I cannot even connect to the access database (see below). Could anyone explain it to me as simple as...
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 database is started, this database has numerous VB-forms, and one of those forms calls my python-program, so far so good. But before my python-program...
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? Python would be running on Unix and need to do Adabas and DB2 access. Screen-scraping is a common technique. Any screen scraping modules for...
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 relational databases except at the table column level. I am working on some Python which would hopefully give me a form of generic access to more...
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 python scripts as I can with MySQLdb. But I cannot even connect to the access database (see below). Could anyone explain it to me as simple as...
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 application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. ...
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 read the file and produce a report. Can this be done, if could you point me to some doc? Thanks. Wayne
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 database contents and displaying it (HTML output). But when I run that python from webserver (http://localhost/cgi-bin/ database.py) there comes...
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 bit over the years, offen by students here on practice. I'd like to present my group with the idea of replacing the database with a well thought...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.