Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Chris Angelico
On Wed, Mar 27, 2013 at 10:19 AM, Steven D'Aprano wrote: > On Wed, 27 Mar 2013 06:39:24 +1100, Chris Angelico wrote: >> I strongly recommend upgrading. 2.3.4 dates back to 2004, that's roughly >> a decade of bug fixes and feature enhancements behind the times. > > Python 2.3 is still supported by

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Steven D'Aprano
On Wed, 27 Mar 2013 06:39:24 +1100, Chris Angelico wrote: > On Wed, Mar 27, 2013 at 6:24 AM, Kyle wrote: >> On Mar 26, 2:43 pm, Chris Angelico wrote: >>> On Wed, Mar 27, 2013 at 5:13 AM, Kyle wrote: >>> > Thanks for the suggestion. Looks like we currently use 2.3.4. >>> >>> > This still wouldn'

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Chris Angelico
On Wed, Mar 27, 2013 at 6:24 AM, Kyle wrote: > On Mar 26, 2:43 pm, Chris Angelico wrote: >> On Wed, Mar 27, 2013 at 5:13 AM, Kyle wrote: >> > Thanks for the suggestion. Looks like we currently use 2.3.4. >> >> > This still wouldn't solve the problem because now the user would need to >> > call

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Kyle
On Mar 26, 2:43 pm, Chris Angelico wrote: > On Wed, Mar 27, 2013 at 5:13 AM, Kyle wrote: > > Thanks for the suggestion. Looks like we currently use 2.3.4. > > > This still wouldn't solve the problem because now the user would need to > > call something like  getattr(wbt, "exec")() instead of >

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Chris Angelico
On Wed, Mar 27, 2013 at 5:13 AM, Kyle wrote: > Thanks for the suggestion. Looks like we currently use 2.3.4. > > This still wouldn't solve the problem because now the user would need to call > something like getattr(wbt, "exec")() instead of wbt.exec() like > all the other commands. > > I think

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Ethan Furman
On 03/26/2013 11:13 AM, Kyle wrote: On Monday, March 25, 2013 4:28:34 PM UTC-4, Kyle wrote: I am using swig to generate our CLI for TCL and Python. In this CLI, we have a subcommand "exec" that is failing to compile in the python case. There seems to be some built-in python command "exec" whic

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-26 Thread Kyle
On Monday, March 25, 2013 4:28:34 PM UTC-4, Kyle wrote: > I am using swig to generate our CLI for TCL and Python. In this CLI, we have > a subcommand "exec" that is failing to compile in the python case. There > seems to be some built-in python command "exec" which is giving a syntax > error in

Re: How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-25 Thread Chris Angelico
On Tue, Mar 26, 2013 at 7:28 AM, Kyle wrote: > I am using swig to generate our CLI for TCL and Python. In this CLI, we have > a subcommand "exec" that is failing to compile in the python case. There > seems to be some built-in python command "exec" which is giving a syntax > error in the .py fi

How to define "exec" method on a class object? Get syntax error due to built in command

2013-03-25 Thread Kyle
I am using swig to generate our CLI for TCL and Python. In this CLI, we have a subcommand "exec" that is failing to compile in the python case. There seems to be some built-in python command "exec" which is giving a syntax error in the .py file generated by swig when I try to import it: def