On Tue, 03 Mar 2009 18:58:47 -0000, W. eWatson <notval...@sbcglobal.net> wrote:

I'm probably confused too.  Let's try this. In
        s=dialog.stopVar.get()
I'd like to eliminate the statement and replace it with something like:
        s="dialog." + "stopV.get()"
            )and execute that--I'm aware of the exec operation--problems)
where StopV is a string name taken from the config file. That is, in the config file there would be something like:
stop_time = 18:00:00, stopV.

I'm trying to think of a case where opening up this security hole is
even marginally wise, and I'm failing.  If you absolutely must prat
around with indirections like this, wouldn't

  s = getattr(dialog, variable_containing_the_string_stopV).get()

be a much less unsafe idea?

--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to