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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -