[EMAIL PROTECTED] wrote:
> I know I can use eval, but I've always been told that if you're using
> eval, you're doing it wrong. Also not using eval limits the scope damage
> that can be caused by any errors in my application which could cause
> the database to be poisoned.
a more robust approach
Alex Martelli wrote:
> sys.modules[__name__].__dict__ may be more handily accessed by the
> built-in function globals().
Well there you go. Glad it's not that awkward.
--
http://mail.python.org/mailman/listinfo/python-list
Edward Elliott <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Basically my application has a scheduler which stores names of functions
> > defined in the "schedule" module in a database, to be run on certain
> > days. Every night I call schedule.RunSchedule, which grabs all the rows on
[EMAIL PROTECTED] wrote:
> Basically my application has a scheduler which stores names of functions
> defined in the "schedule" module in a database, to be run on certain
> days. Every night I call schedule.RunSchedule, which grabs all the rows on
> the database that have to be run now, and I want
Hey there
My question is pretty simple - I want to use something like getattr to
grab a symbol from the local scope from a string.
Basically my application has a scheduler which stores names of
functions
defined in the "schedule" module in a database, to be run on certain
days.
Every night I call