The Python 3.3 equivalent of 'execfile' -
this question has answer here:
- what alternative execfile in python 3? 12 answers
- alternative execfile in python 3? [duplicate] 4 answers
i need find out how open .py files after writing them in notepad++. find interface more useful python window.
in tutorial following along guy uses
execfile(pathway)
but execfile not work in 3.3.
is there equivalent statement in 3.x?
open file, read it, , pass contents exec
:
with open('file.py') source_file: exec(source_file.read())
Comments
Post a Comment