python cgi newbie question

Anastasios Papadopoulos tpapad at b-online.gr
Tue Sep 4 02:50:51 EDT 2001


Check file permisions of every file the programm uses.It must be available
to everyone, since a web-user doesn't have much permissions and Apache (?)
uses this account.
That is, if the programm works perfect in Python...
--
Anastasios Gr. Papadopoulos
Athens-Greece
{Life Sucks!...then you die...}
Ï "eif" <eif at ukonline.co.uk> Ýãñáøå óôï ìÞíõìá
news:8ETk7.7524$QG.2691675 at monolith.news.easynet.net...
> hi again
> hopefully for the last time - ive written this cgi program which works
fine
> within the python environment but when up on a host server only outputs
the
> html headings and not my actual main program output. Im assuming this is
due
> to the program not importing the text files properly/at all?
> and im wondering if anyone can point me in the right direction. this is
the
> main program
>
> #!/usr/local/bin/python
> import string, cgi, sys
> from pprint import pprint
>
> print "Content-type: text/html\n\n"
> print
>
>
>
>
> lecturerlist = [rec.split('|') for rec in
open('lecturer.txt').xreadlines()]
> examlist = [rec.split('|') for rec in open('exam.txt').xreadlines()]
> allocationlist = []
>
>
> ########main program  sort
>
>
> def output():
>
>  print "<HTML>"
>  print "<Body>"
>
>  print "<H5>Allocaction of Exams<H5>"
>  print "<BR>"
>  print "<H2>Invigilator - Email Address - Subject - Exam length - Exam
> Date - Exam Time - Exam Room <H2>"
>  print allocationlist
>  print "</Body>"
>  print "</HTML>"
>
>
>
>
>
> sort1()
> output()
>
>
>
>
>





More information about the Python-list mailing list