Python and cgi and <a> problem!

Chris Liechti cliechti at gmx.net
Mon Sep 23 17:00:02 EDT 2002


"CheapSkate" <gua81 at XXXyahoo.com> wrote in
news:ammn6e$lj7$1 at lust.ihug.co.nz: 

> Hi Im currently making a cgi script in python which list all the
> files&directory in a directory and list them into an html file with
> all the files linked to the actual file.
> ..... did what I just said make any sense?
> 
> Currently I can list all the files and directories and print it out in
> the html file.
> my problem now is how to add the anchor tag <a>???
> 
> here is the line which prints the files&directories in the html file:
> print crap
> 
> , where crap is a filename such as colour.txt

print '<A href="%s">%s</A>' % (filename, filename)

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list