News

At the top (first line in blue), ... cProfile is hardly the only way to profile a Python application. cProfile is certainly one of the most convenient ways, given that it’s bundled with Python.
Next you can add the function decorator @profile to any functions you want to explore, and then start the line profiler either by clicking the Run→Profile line by line menu item or by pressing ...
You can run this at the command line (we called it iprocess.py): python iprocess.py 4 33 2 python iprocess.py --sum 10 20 30. In the first case, the program will select and print the largest number.
This can also be done from the command line: python -m timeit "for n in range(100):pass" On the whole, though, it’s easier to use the technique shown above, since you don’t need to awkwardly ...