Hi: I have this code: x = 1 while x <= bitties: file = open(p + str(x) + ".txt") for line in file: print line print eval(bits[x - 1]) x += 1
which throws this error: [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: Traceback (most recent call last): [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req) [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: File "/usr/lib64/python2.4/site-packages/mod_python/cgihandler.py", line 96, in handler\n imp.load_module(module_name, fd, path, desc) [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: File "/var/www/vhosts/ articles.13gems.com/httpdocs/index_frame.py", line 89, in ?\n print eval(bits[1]) [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: File "<string>", line 1 [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: tableBottom(348,180) [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: ^ [Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler mod_python.cgihandler: SyntaxError: invalid syntax However, if I edit out the offending line and add: print tableBottom(348,180) it prints! What´s wrong? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list