Skip to content

{ Tag Archives } Programming

So what is /dev/autofs_nowait ?

When examining running processes and logfiles on OS X, it’s quite common to see calls to open ‘/dev/autofs_nowait’, but what’s the file for?? Looking at the on-disk file doesn’t give many clues: ls -al /dev/autofs_nowait crw-rw-rw- 1 root wheel 10, 27 May 4 17:29 /dev/autofs_nowait So just how often is this file getting […] Also tagged , ,

Batteries Included

A neat property of Python’s sort function is that it automatically sorts list of tuples by the first value of the tuple, this means that if you have a list, lets say of files and their sizes and you want to sort by filesize, you can do: >>> a = [(200, ‘foo.txt’), (100, ‘bar.txt’)] >>> a.sort() >>> a [(100, […] Also tagged