Re: Eval Problem

2009-04-07 Thread J. Cliff Dyer
OK. You still haven't shown the code where tableTop gets defined, so your code is unrunnable. However, I think your problem is that wherever tableTop lives, it isn't part of your globals or locals in eval. See the documentation on evals here: http://www.python.org/doc/1.4/lib/node26.html Somet

Re: Eval Problem

2009-04-07 Thread Victor Subervi
Yes, Python is dynamic, but my server farm, in this era of big business screwing the client and cutting all services and customer support, uses such crappy hardware that all normal code breaks, so I am forced to find work-arounds. Here is more complete code: ourFile = string.split(__file__, "/") p

Re: Eval Problem

2009-04-06 Thread J. Clifford Dyer
On Mon, 2009-04-06 at 15:11 -0400, Victor Subervi wrote: > 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

Eval Problem

2009-04-06 Thread Victor Subervi
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