Perl to Python

Paul Malinowski paul.malinowski at
Tue Nov 27 00:45:17 CET 2001


I am relatively new to programming and very new to Python.
I have a number of Perl/CGI scripts on a Linux/Apache web
server that run queries to 
MS Access databases through an Openlink service running on
an NT server.  Works great!  I have been trying to do the 
same thing with Python and am not having much luck.  Would
it be to much to ask one of you Python guru's to help me
translate this from Perl to Python?  (I intentionally left
out the paths in the Perl environment variables to the 
OpenLink installed client on my Linux system to hide user 
names and such...)

Any help would be really appreciated!

Paul Malinowski


#Setting some environment variables.

#SQL query that runs qryModelSNforWeb in the warranty Access database.
$sql = "echo \"select *  from <Query in MS Access Database>;\" |
odbctest DSN=<OpenLink Definition to MS Access DataBase>";

if (!open(SQL,"$sql |")) {
    print "Unable to open connect to database<br>";
    exit 0;

if (open(SQL, "$sql |")) {
    chomp(@rawdata = <SQL>);

More information about the Python-list mailing list