title: How are glob.glob()'s return values ordered?
body: <p>I have written the following Python code:</p>
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  
  import os, glob
  
  path = '/home/my/path'
  for infile in glob.glob( os.path.join(path, '*.png') ):
      print infile
  </code></pre>
  <p>Now I get this:</p>
  <pre><code>/home/my/path/output0352.png
  /home/my/path/output0005.png
  /home/my/path/output0137.png
  /home/my/path/output0202.png
  /home/my/path/output0023.png
  /home/my/path/output0048.png
  /home/my/path/output0069.png
  /home/my/path/output0246.png
  /home/my/path/output0071.png
  /home/my/path/output0402.png
  /home/my/path/output0230.png
  /home/my/path/output0182.png
  /home/my/path/output0121.png
  /home/my/path/output0104.png
  /home/my/path/output0219.png
  /home/my/path/output0226.png
  /home/my/path/output0215.png
  /home/my/path/output0266.png
  /home/my/path/output0347.png
  /home/my/path/output0295.png
  /home/my/path/output0131.png
  /home/my/path/output0208.png
  /home/my/path/output0194.png
  </code></pre>
  <p>In which way is it ordered?</p>
  <p>To clarify: I am not interested in ordering - I know <code>sorted</code>. I want to know in which order it comes by default.</p>
  <p>It might help you to get my ls -l output:</p>
  <pre><code>-rw-r--r-- 1 moose moose 627669 2011-07-17 17:26 output0005.png
  -rw-r--r-- 1 moose moose 596417 2011-07-17 17:26 output0023.png
  -rw-r--r-- 1 moose moose 543639 2011-07-17 17:26 output0048.png
  -rw-r--r-- 1 moose moose 535384 2011-07-17 17:27 output0069.png
  -rw-r--r-- 1 moose moose 543216 2011-07-17 17:27 output0071.png
  -rw-r--r-- 1 moose moose 561776 2011-07-17 17:27 output0104.png
  -rw-r--r-- 1 moose moose 501865 2011-07-17 17:27 output0121.png
  -rw-r--r-- 1 moose moose 547144 2011-07-17 17:27 output0131.png
  -rw-r--r-- 1 moose moose 530596 2011-07-17 17:27 output0137.png
  -rw-r--r-- 1 moose moose 532567 2011-07-17 17:27 output0182.png
  -rw-r--r-- 1 moose moose 553562 2011-07-17 17:27 output0194.png
  -rw-r--r-- 1 moose moose 574065 2011-07-17 17:27 output0202.png
  -rw-r--r-- 1 moose moose 552197 2011-07-17 17:27 output0208.png
  -rw-r--r-- 1 moose moose 559809 2011-07-17 17:27 output0215.png
  -rw-r--r-- 1 moose moose 549046 2011-07-17 17:27 output0219.png
  -rw-r--r-- 1 moose moose 566661 2011-07-17 17:27 output0226.png
  -rw-r--r-- 1 moose moose 561678 2011-07-17 17:27 output0246.png
  -rw-r--r-- 1 moose moose 525550 2011-07-17 17:27 output0266.png
  -rw-r--r-- 1 moose moose 565715 2011-07-17 17:27 output0295.png
  -rw-r--r-- 1 moose moose 568381 2011-07-17 17:28 output0347.png
  -rw-r--r-- 1 moose moose 532768 2011-07-17 17:28 output0352.png
  -rw-r--r-- 1 moose moose 535818 2011-07-17 17:28 output0402.png
  </code></pre>
  <p>It is not ordered by filename or size.</p>
  <p>Other links: <a href="http://docs.python.org/library/glob.html" rel="noreferrer"><code>glob</code></a>, <a href="http://en.wikipedia.org/wiki/Ls" rel="noreferrer"><code>ls</code></a></p>