+= doesn't work in python cgi's (extra info)
Mitch Chapman
chapman at bioreason.com
Mon Oct 8 13:31:51 EDT 2001
Is it possible that your web server is finding a different (older)
Python executable due to cgi environment configuration?
It would be interesting to see the cgi output from
...
import sys
print sys.version
Michael Palm wrote:
>
> Forgot info on my setup:
> Redhat 7.1/Apache 1.3.17/Python 2.1
> Seems to work OK on Win95/Apache 1.3.2/Python 2.1 (veeeerrry slooowww)
>
> Michael Palm wrote:
>
> > I have a strange error in that += doesn't seem to work in a cgi program
> >
> > test.py:
> >
> > #!/usr/bin/env python
> > print "Content-type: text/html\n\n"
> > j = 1
> > j +=1
> > print " j is %d" % j
> >
> > works fine with
> > python test.py
> >
> > but as a cgi gives
> > j += 1
> > ^
> > SyntaxError: invalid syntax
> >
> > any ideas??
--
Mitch Chapman
Mitch.Chapman at bioreason.com
More information about the Python-list
mailing list