The standard stats::kruskal.test module allows to calculate the kruskal-wallis test on a dataset:
>>> data(diamonds)
>>> kruskal.test(price
Unfortunately I don't know of a function like this. If there isn't one already, it would be an interesting task to construct a function that returns a matrix with all pairwise treatment comparisons. A contrast is considered significant if the following inequality is satisfied
(source: statsdirect.com)
where T is the Kruskal-Wallis test statistic for k samples, S^2 is the denominator of the T statistic, N is the total number (all ni) and Ri is the sum of the ranks (from all samples pooled) for the ith sample, and t is a quantile from the Student t distribution on N-k degrees of freedom.
I know I didn't help much :)
I am also waiting for a better answer