Don't Understand This Error

2009-12-02 Thread Victor Subervi
I get the following error: /var/www/html/angrynates.com/cart/chooseOptions.py 8 from login import login 9 import string 10 import options 11 from particulars import optionsTables, addStore 12 options undefined SyntaxError: invalid syntax (options.py, line 140) args =

Re: Don't Understand This Error

2009-12-02 Thread Chris Rebert
On Wed, Dec 2, 2009 at 2:33 AM, Victor Subervi victorsube...@gmail.com wrote: I get the following error:  /var/www/html/angrynates.com/cart/chooseOptions.py     8 from login import login     9 import string    10 import options    11 from particulars import optionsTables, addStore    12

Re: Don't Understand This Error

2009-12-02 Thread Bruno Desthuilliers
On Wed, Dec 2, 2009 at 2:33 AM, Victor Subervi victorsube...@gmail.com wrote: def colors(callingTable, which='', specificTables=[]): Warning : default arguments are eval'd only once, at function creation time. This is a well known gotcha that can lead to unexpected behaviours like: def

Re: Don't Understand This Error

2009-12-02 Thread Victor Subervi
To those who caught the colon at the end of what I thought was going to be def but turned out to be something else, thank. On Wed, Dec 2, 2009 at 5:55 AM, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: On Wed, Dec 2, 2009 at 2:33 AM, Victor Subervi victorsube...@gmail.com

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file =

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Terry Reedy
Stef Mientki wrote: import sys p_locals = sys._getframe(1).f_locals Which locals does this get you? __init__'s? (locals()?) AFAIK locals() == sys._getframe(0).f_locals Then it is not clear to me which locals your are getting. p_globals = sys._getframe(1).f_globals Isn't this

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-21 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: import sys p_locals = sys._getframe(1).f_locals Which locals does this get you? __init__'s? (locals()?) AFAIK locals() == sys._getframe(0).f_locals Then it is not clear to me which locals your are getting. The locals of the code block where

Don't understand syntax error: unqualified exec is not allowed ..

2008-10-20 Thread Stef Mientki
hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file = test_upframe2 : class

Re: Don't understand syntax error: unqualified exec is not allowed ..

2008-10-20 Thread Terry Reedy
Stef Mientki wrote: hello, I've syntax error which I totally don't understand: ## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n' test_upframe2.Do_Something_In_Parent_NameSpace ( code ) ### file = test_upframe2 : class