On Thu, Feb 4, 2016 at 6:33 AM, 阎兆珣 <yanzhao...@greendh.com> wrote:
>    Excuse me for the same problem in Python 3.4.2-32bit
>
>    I just discovered that <eval()> function does not necessarily take the
>    string input and transfer it to a command to execute.
>
>    So is there a problem with my assumption?

eval evaluates an expression, not a statement. For that, you would use exec.

If you're just trying to import though, then you don't need it at all.
Use the importlib.import_module function instead to import a module
determined at runtime. This is more secure than eval or exec, which
can cause any arbitrary Python code to be executed.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to