When does the sheaf cohomology of a topological space vanish?

The question is in the title. A more precise formulation is:

Let $X$ be a topological space. When does $H^i(X,F) = 0$ for all $i > 0$ and all abelian sheaves $F$ on $X$?

The obvious example is a discrete space. I'd be happy with a characterization of compact Hausdorff topological spaces $X$ satisfying the above property.

Edit: Following Georges Elencwajg's answer, I would like to clarify that these spaces will be quite pathological from the viewpoint of classical topology. Nevertheless, I do not know a single example which does satisfy the above vanishing property and is not discrete. For example, does the Cantor set have this property?

-
Before the Cantor set, you might want to look at the one point compactification of $\mathbb N$. –  André Henriques Apr 13 '13 at 17:59
If every open cover of $X$ has a refinement consisting of disjoint open sets, then every (locally) surjective map of sheaves on $X$ is surjective on global sections, so that higher sheaf cohomology is trivial. –  Tom Goodwillie Apr 13 '13 at 19:56
A compact Hausdorff space has the property you want if and only if it is totally disconnected. See theorem II.16.21 Bredon, "Sheaf theory" (second edition, GTM 170). Examples of compact totally disconnected spaces are the Cantor set and $\mathbb{Z}_p$. –  user31960 Apr 13 '13 at 21:47
Thanks! If you write this as an answer, I would be happy to accept it. –  anon Apr 13 '13 at 23:38
(The Cantor set is homeomorphic to $\mathbb Z_p$.) –  Tom Goodwillie Apr 14 '13 at 0:27

1) For example the extremely simple contractible space $I=[0,1]$ is not suitable:
Consider the inclusion $j\colon U=(0,1)\hookrightarrow I$ and take for $F$ the sheaf on $I$ defined by $F=j_!(\mathbb Z_U)$, the constant sheaf $\mathbb Z_U$ on $U$ extended to $I$ by zero.
We then have $H^1(I,F)=\mathbb Z$, as proved in Bredon's Sheaf theory, page 82.
2) There is a very similar statement in scheme theory saying that $H^1(\mathbb A^1_k,j_!(\mathbb Z_U))=\mathbb Z$, where now $U$ is the complement of two closed points in the affine line $\mathbb A^1_k$: see Hartshorne's Algebraic Geometry, Exercise III 2.1