Why must “exec” (and not “eval”) be used for Python import statements?

前端 未结 3 1659
天命终不由人
天命终不由人 2020-12-30 07:15

I\'m trying to run a snippet of Python from within Java, using Jython. If I use an exec statement to import, everything works.

PythonInterpreter pi = new Py         


        
3条回答
提交回复
热议问题