I’m starting a new project using python, so I installed pylint via macports for some code checking. Using Textmate for all my coding, I wanted a neat little shortcut for executing pylint on a given file.

Textmate is really cool and allows already for validating your source code with pyCheckMate, which is based on pychecker with ctrl+shift+v. Another useful command in Textmate’s python bundle is running the script with pyMate (cmd+r). There are also various bundles for other languages, which make your life easy such as creating a XML file. I mostly use it for python and LaTeX, for both of which it is very convenient.

As I really like these shortcuts I created one for pylint, see the figure below for details. Note that it links to my /opt/local/ installation of pylint, which is the standard macports install path.

Pylint Command in Textmate

You can configure your call to pylint, e.g. I disabled some style checks (See pylint –help). My suggestion is to print with the html output format, which works really nice with the TextMate output viewer.

Textmate allows for very convenient formulation of calls on files with built-in variables. As this was so easy and very handy, I’m going to look for more cool features in its documentation .

I was tired of the command line traversing though my somehow dispersed directory hierarchy.

The reason is that I have basically 3 separate locations where I need the Terminal frequently: a subversion tree for writing, a subversion tree for my code and another code CVS repository. These are three directories I typically cd into.

With Terminal you can set the initial directory. For me this is the Inbox. This doesn’t help though with getting around fast. One quick solution to do this is use the environment variable CDPATH. Including the three paths above to the CDPATH allows for direct cd-ing into the sub-directories. But there’s a problem:

Tab completion does not work with CDPATH. Solution? Extended bash completion. You can get bash-completion via maports. (Don’t forget to include it in your .bashrc: source /opt/local/etc/bash_completion)

Another thing that is quite nice is the Quicksilver (QS) Terminal module plugin. With this you can browse through using QS and then select “Go To Directory in Terminal” as the action. I use this one typically, when creating a new shell. However, when I’m already in a Terminal I don’t like to switch contexts and rather use the Terminal itself.

I’m still looking for something like a stack of recent paths cd’ed into to quickly change directories via some shortcut.

UPDATE: I really dig bash completion: If you have a directory with many folders just distinguished by an integer-suffix, a ‘cd’ without specifying the integer results in cd’ing into the one with the largest number.

Why is this useful? I have a folder with lots of exercises for a class.  I  add a folder per exercise, but typically am only interested in the most recent one, i.e. the one with the largest suffix. Nowadays, I do not need to specify the number of the latest exercise anymore. I rather enter

cd exercise

and change into directory exercise8 (as it is the 8th this week) automagically.

I rarely use python interactively. Nevertheless, when using it, it’s nice to have features like command history. For the standard python interpreter, you need to add some extra configuration.

I also installed iPython lately in order to use it with matplotlib. matplotlib is available per macports for all the MAC users out there. Matplotlib tutorials suggested iPython so I installed it. Anyways, iPython already includes some neat features from the start and in my opinion some clever tab behavior. Tab on start creates tabs for python indentation, but given some typed text it will do tab completion. Very convenient.

I have my MacBook for a year now and have suggested to other people to get one ever since. It was my first Mac ever and I have to say, I love OSX. I got infected with the Ipod virus 3 years ago: first a Nano and recently a Touch and have been loving it ever since.
However my enthusiastic advertising to friends for the MacBook has diminished. There is a simple reason. It’s built very cheap… As many others already wrote, the MacBook gets these cracks opposite of the screen protection bumps. Take a look MacBook pics or read the article from newsvine (via df).
The MacBook, although it looks cool, is just built on the cheap side. And that is really surprising, thinking about my incredible iPod Touch. Its glass screen is basically indestructible. Believe me – I dropped it so often, it’s not even funny…
Back to the MacBook: I’m pretty lucky, since I have 3 year Apple care from my University’s Buying Program anyway, but it flat out sucks to have my laptop broke after a single year. Nowadays I would get a 15″ McBook Pro, I guess. I thought I wanted to go small (I love small laptops), but if you look at the MacBook, the encasing around the screen is really thick, so my “small” 13″ is not really that much smaller than the 15″ MacBook Pro. Size and weight are marginal and there is a benefit of: “Encased in sleek and sturdy aluminum” as described above. My next buy will definitely be a MacBookPro.

What do I love about OSX:

- Seamless integration of a very easy to use, intuitive GUI with power full UNIX in the back. Although I’m far from using a lot of the UNIX features, some basic functionality I need for work and play. Nevertheless, I mostly prefer clicking and scrolling to cryptic command line calls, grep’ing and piping.

-X Code provides me with the opportunity to easily get everything I need for my software development.

-Many talented people provide ingenious tools for OSX such as Quicksilver or Textmate, that make my computer work so much easier. (For a good overview of cool apps on the mac, see Christian Plessl’s list.)

I just feel very content when using my Mac, and that’s a first for me: I always felt that Windows constrained me way too much. On the other hand, I feel Linux is way too complex and not user-friendly.

More later on MacPorts, command-line magic and Python development on the Mac…

1 day snowboard tour from Mathon to the saddle next to Piz Beverin

1 day at the Flumserberg – took one workday afternoon off.

2 sunny days at Lech with the new board and some jumping in slushy snow.

Only 1 day in Sedrun due to stormy weather on the Saturday. We only took the train from Andermatt to Sedrun via the Oberalp Pass, which is very cool though. Sedrun is better for Touring though – wouldn’t go there again for the slopes…

Still alive and healthy and now with the snow coming back, four more days seems like a must…

This is the target for this winter . Up to now I’ve been:

2 single days at Flumserberg

A single day + 8 days over Christmas + 2 days last weekend at Flims/Laax.

1 day at Zugspitzarena.

1 Day Touring in Amden to the top of Gulmen.

1 Day Touring from Stein up to Stockberg.

So it’s 16 days – 2 days skiing and 2 days touring and still half the season to go!

Welcome to Blogs.ethz.ch. This is your first post. Edit or delete it, then start blogging!