I have a demo file:
In the Windows Console I can run the file with:
How can I execute the file in the Python Shell instead?
If you're wanting to run the script and end at a prompt (so you can inspect variables, etc), then use:
python -i test.py
That will run the script and then drop you into a Python interpreter.