Sounds like you're trying to run the code inside the Python interpreter by using a function called runfile
, but there's no such function built-in to Python.
Assuming your script is in a file called myscript.py
, it's most common to run a script from a command-line interpreter with...
$ python myscript.py
...although on Python 2.x, you can run it from inside the Python interpreter with...
>>> execfile('myscript.py')
See this question for the Python 3.x equivalent.