The Python 3.3 equivalent of 'execfile' -


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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -