Puzzling form/cgi problem
Dfenestr8
chrisdewinN0SPAM at yahoo.com.au
Sun Nov 2 15:23:24 EST 2003
Hi.
I have a problem with a subroutine in a cgi script that's supposed to
return the byte location at the end of a file, which the script then
stores as a hidden input on a web form.
Unfortunately, even though it works fine in the python shell, in the
cgi-script it always returns "0". That's no use to me at all.
Here's the subroutine......
def getLastByteLoc(log):
#open log file
f = open(log)
#seek to end of log file.
f.seek(0,2)
location = f.tell()
f.close()
return location
More information about the Python-list
mailing list