Dale Amon wrote:
On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote:
Please don't sink to exec or eval to solve what is really a straightforward problem.

I do not really see any other way to do what I want. If
there is a way to get rid of the exec in the sample code
I have used, I would love to know... but I can't see how
to import something where part of the name comes from user
command line input without interpreting the code via exec.

at this point it would help to know what version of Python
you are using.  If importlib is available, use that.  Otherwise
you should investigate __import__.

--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to