Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41945

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

References <2461da1a-d7d8-465b-8c12-6dc78398ef79@googlegroups.com> <27d47c3b-18d7-4ef0-b6fb-d99482c72bdd@googlegroups.com> <mailman.3768.1364323431.2939.python-list@python.org> <c4405d82-2bf3-4d3d-8f7d-25d90915a8f1@v8g2000yqe.googlegroups.com>
Date 2013-03-27 06:39 +1100
Subject Re: How to define "exec" method on a class object? Get syntax error due to built in command
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3772.1364326766.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Mar 27, 2013 at 6:24 AM, Kyle <stalkernew@gmail.com> wrote:
> On Mar 26, 2:43 pm, Chris Angelico <ros...@gmail.com> wrote:
>> On Wed, Mar 27, 2013 at 5:13 AM, Kyle <stalker...@gmail.com> 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")(<args>) instead of wbt.exec(<args>) like all the other commands.
>>
>> > I think the easiest thing for me to do would be to just change the command name from exec to something else.
>>
>> ..... that's pretty ancient. Any chance you can upgrade at least to 2.7.3?
>>
>> ChrisA
>
> Unfortunately, while I could update my machine, there's no guarantee
> others would have the same version--the 2.3.4 seems to be the default
> on our machines and in the automount dirs.

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. 2.7.3 is the latest 2.x release, and most likely your code will
run unchanged on it; if you can switch to 3.3.0 (the latest 3.x
release), that would actually fix your exec problem, for what that's
worth. (Moving to 3.3.0 would be a much bigger change, though, and one
that's likely to require code edits.)

It's a good thing Python has neither the number nor breadth of
security vulnerabilities as Windows; you're using something nearly as
old as an unpatched Windows XP, no service packs, no Windows Update,
nothing... no sane systems administrator would let you put that on the
internet. It may not be suicidal like that, but it's still ten years'
worth of updates you're missing out on!

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to define "exec" method on a class object? Get syntax error due to built in command Kyle <stalkernew@gmail.com> - 2013-03-25 13:28 -0700
  Re: How to define "exec" method on a class object? Get syntax error due to built in command Chris Angelico <rosuav@gmail.com> - 2013-03-26 07:43 +1100
  Re: How to define "exec" method on a class object? Get syntax error due to built in command Kyle <stalkernew@gmail.com> - 2013-03-26 11:13 -0700
    Re: How to define "exec" method on a class object? Get syntax error due to built in command Ethan Furman <ethan@stoneleaf.us> - 2013-03-26 11:36 -0700
    Re: How to define "exec" method on a class object? Get syntax error due to built in command Chris Angelico <rosuav@gmail.com> - 2013-03-27 05:43 +1100
      Re: How to define "exec" method on a class object? Get syntax error due to built in command Kyle <stalkernew@gmail.com> - 2013-03-26 12:24 -0700
        Re: How to define "exec" method on a class object? Get syntax error due to built in command Chris Angelico <rosuav@gmail.com> - 2013-03-27 06:39 +1100
          Re: How to define "exec" method on a class object? Get syntax error due to built in command Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-26 23:19 +0000
            Re: How to define "exec" method on a class object? Get syntax error due to built in command Chris Angelico <rosuav@gmail.com> - 2013-03-27 12:27 +1100

csiph-web