On Feb 28, 4:21 am, Sammo <sammo2...@gmail.com> wrote: > Given that execfile has been removed in py3k
execfile has not been really removed, it is just spelled differently: >>> exec(open(myfile.py).read()) BTW, from the help message >>> help(exec) Help on built-in function exec in module builtins: exec(...) exec(object[, globals[, locals]]) Read and execute code from a object, which can be a string, a code object or a file object. The globals and locals are dictionaries, defaulting to the current globals and locals. If only globals is given, locals defaults to it. I would have expected >>> exec(open('myfile.py')) to work too. Any idea why it does not? Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list