os.walk() yields in each step what it will do in the next steps. You can in each step influence the order of the next steps by sorting the lists the way you want them. Quoting the 2.7 manual:
When topdown is True, the caller can modify the dirnames list in-place (perhaps using del or slice assignment), and walk() will only recurse into the subdirectories whose names remain in dirnames; this can be used to prune the search, impose a specific order of visiting
So sorting the dirNames will influence the order in which they will be visited:
for rootName, dirNames, fileNames in os.walk(path):
dirNames.sort() # you may want to use the args cmp, key and reverse here
After this, the dirNames are sorted in-place and the next yielded values of walk will be accordingly.
Of course you also can sort the list of fileNames but that won't influence any further steps (because files don't have descendants walk will visit).
And of course you can iterate through sorted versions of these lists as unutbu's answer proposes, but that won't influence the further progress of the walk itself.
The unmodified order of the values is undefined by os.walk, meaning that it will be "any" order. You should not rely on what you experience today. But in fact it will probably be what the underlying file system returns. In some file systems this will be alphabetically ordered.