User Tools

Site Tools


python

Table of Contents

Cookbooks

IDEs

PyCharm is our current favourite.

Spyder is a nice platform-agnostic editor.

Shells

IPython

Nice interactive python shell.

Benchmarking runtime can be done just like in bash, by prefixing a command with%time

%time (numpy.array(b)==8).sum()

Profiling

A very simple and fast way to profile a single-threaded execution is:

# sort profiling result by time
python -m cProfile -s time  my_script.py > profiling

For further info see e.g. this Stackoverflow thread

python.txt · Last modified: 2018/08/09 10:12 by mantis