In article <4c8423d3$0$28657$c3e8...@news.astraweb.com>,
 Steven D'Aprano <st...@remove-this-cybersource.com.au> 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

Reply via email to