PyLab + tmux + iTerm2

Due to the fact that iTerm2 is crashing more and more often, I decided yesterday to put my python console inside a tmux window & at the same time launching pylab instead of a simple ipython console.

So in the iTerm2 conf we can launch a command to do that but it wasn’t working by containing the command inside single quotation marks. here’s the command:

/usr/local/bin/tmux -l new -s pylab "/usr/local/bin/ipython --pylab"

I used to have some problem with colors, so I think adding infos about the terminal can help but considering the output will be in png or t pytk, it’s not really useful.

/usr/local/bin/tmux -l new -s pylab "TERM=screen-256color /usr/local/bin/ipython --pylab"

 

NB:  It works pretty well with the “Quake console”-like (called “dedicated window”) but if iterm2 crashes the pylab window will be only available in a normal term, I gotta write a script to make the quake console retrieve existing sessions… (it’s been a while I haven’t written a shell script.) 

// I’ll put the script here if someday I feel the need to write it.

Advertisements