python line profiler view result
Question: I have ran `kernprof` on a file called `RP.py` and it spits out `RP.py.lprof`

Now, i'm trying to view this file. If i open a `cmd` window and type `python
-m line_profiler RP.py.lprof` it gives me the text, but it not formatted in a
way that I can read it.

Is there a way to 1) turn `lprof` into text?

or run it in a shell. I have tried:

    
    
    import sys
    import subprocess
    subprocess.call([sys.executable,'C:\\Python27\\python.exe', '-m', 'line_profiler', 'RP.py.lprof'])
    

[execfile with argument in python
shell](http://stackoverflow.com/questions/5788891/execfile-with-argument-in-
python-shell) from this link. But this doesn't work.


Answer: I don't have ready access to a Windows box, but my first guess based on the
description is that the line-endings are `\n` instead of `\r\n`. Try piping
the results to a text file and then open it in a programmer's editor (_not_
Notepad).

`python -m line_profiler RP.py.lprof > results.txt`

