I need to execute a Python script from an already started Python session, as if it were launched from the command line. It should be similar to doing
source in bash or sh.
The builtin function
execfile does this.
If you're running ipython (which I highly recommend for interactive python sessions), you can type:
to execute the module (rather than importing it). You'll get file-name completion, which is great for ReallyLongModuleName.py (not that you'd name your modules like that or anything).