Archives
Blogroll
Python
Monthly Archives: February 2010
Figuring out largest/smallest/median filesizes
I had to get some statistics about file sizes today, but couldn’t really find a tool for the job, so naturally, I wrote one. import os, sys, re from os.path import join, getsize, exists def median(numbers): s = sorted(numbers) … Continue reading