How to run a python script external to Blender to run bpy commands in Blender'spython console
This is the equivalent to running the script directly, referencing a scripts path from a 2 line text-block.

filename = "/full/path/to/myscript.py"
exec(compile(open(filename).read(), filename, 'exec'))


You might want to reference a script relative to the blend file.

import bpy
filepath = bpy.path.abspath("//myscript.py")
exec(compile(open(filepath).read(), filepath, 'exec'))