In article <[email protected]>,
Steven D'Aprano <[email protected]> wrote:
> fp = open("python.txt")
> text = fp.read()
> fp.close()
> exec(text)
> But keep in mind that the contents of python.txt will be executed as if
> you had typed it yourself. If you don't trust the source with your life
> (or at least with the contents of your computer), don't execute it.
Well, this is true, but eval() or exec() isn't really exposing him to
anything that import isn't.
--
http://mail.python.org/mailman/listinfo/python-list