giovedì 21 ottobre 2010

Python: Spyder on Ubuntu 10.10

Spyder, the great python development environment specially designed for scientific computing has been added to the Ubuntu 10.10 repository.

After the installation using synaptic or the shell command "sudo apt-get install spyder" you may encounter this problem:

Warning: None of the following fonts is installed: [u'Andale Mono']
Segmentation fault

To fix that you can simply install the font library with the following command:

sudo apt-get install ttf-mscorefonts-installer

Now you can run spyder just typing "spyder" in a shell

martedì 12 ottobre 2010

Python: how to open a plot without calling show() each time

Just add these lines to activate the matplotlib interactive mode:

from matplotlib
import interactive
interactive(True)

This way, the show() call is not necessary and the plotting window will be shown each time a plotting function is called.