To get a cProfile of ipython inside of the git repo you could run:
"python -m cProfile ipython.py"
Currently file is wrongly detected and it crashes, after this commit, you get a proper cProfile.
I know this script is designed to just start ipython from the top-level source dir, but won't this mean that the script will no longer work if curdir is not the top-level source dir? That may be OK though. Can we make it work both ways?
Ha, I found another way (althought, it looks like a hack^^).
This works now both ways (but doesn't look nice anymore at least for me).
Make ipython.py cProfile-able
When using __file__ on startup and cProfile in the same time, __file__
is defined as the __file__ of cProfile and not the local ipython.py.
With using sys.argv instead, it's possible to get a cProfile.
This fix does work for me in and out of the directory with ipython.py, but the following has always worked for me:
python -m cProfile `which ipython`
Brian, should I go ahead and merge this?
I haven't testing this, but it looks fine.
Merge branch 'ready_cProfile' of https://github.com/tomspur/ipython
closed by 604c8e1