need some cgi help please
Douglas Soares de Andrade
dsa at unilestemg.br
Wed Jun 8 06:15:03 EDT 2005
Hi !
Im a python begginer, but...
> form = cgi.FieldStorage()
> DataRecord = form['DataTime'].value
> Customer = form['CustName'].value # should be automatically filled in
>
Can you try this ?
print "Content-Type: text/html\n\n"
print
WorkingFile =
open("/var/www/stretch/web_root/SidCrops/"+Customer+"/"+DataRecord,"r")
for line in WorkingFile:
print line
WorkingFile.close()
> here is the error:
> WorkingFile undefined, builtin open = <type 'file'>, Customer =
> 'tenderloin', DataRecord = 'Tue Jun 7 20:13:35 2005.txt'
>
> IOError: [Errno 2] No such file or directory:
> '/var/www/stretch/web_root/SidCrops/tenderloin/Tue Jun 7 20:13:35
> 2005.txt'
> args = (2, 'No such file or directory')
> errno = 2
> filename = '/var/www/stretch/web_root/SidCrops/tenderloin/Tue Jun
> 7 20:13:35 2005.txt'
> strerror = 'No such file or directory'
This files
'/var/www/stretch/web_root/SidCrops/tenderloin/Tue Jun 7 20:13:35 2005.txt'
exists ?
See the spaces in the file...
--
Douglas Soares de Andrade
http://douglasandrade.cjb.net - dsa at unilestemg.br
UnilesteMG - www.unilestemg.br
ICQ, MSN = 76277921, douglas at tuxfamily.org
More information about the Python-list
mailing list