title: ordering a list of string according to name (month)
body: <p>I have a list of figures and I want to create a text file (using python) with their names listed in a specific order (for a movie creation with mencoder). In particular here, the figure names include months (April, August...). I want the one for Januray first, then February and so on.</p>
  
  <p>I know I could do it in an ugly way, but I am interested in a solution which would be both elegant (=pythonic?) and eventually more general.</p>
  
  <p>My files are, in natural order:<br>
  cld_for_April_EISopt_1000.png<br>
  cld_for_August_EISopt_1000.png<br>
  cld_for_December_EISopt_1000.png<br>
  cld_for_February_EISopt_1000.png<br>
  cld_for_January_EISopt_1000.png<br>
  cld_for_July_EISopt_1000.png<br>
  cld_for_June_EISopt_1000.png<br>
  cld_for_March_EISopt_1000.png<br>
  cld_for_May_EISopt_1000.png<br>
  cld_for_November_EISopt_1000.png<br>
  cld_for_October_EISopt_1000.png<br>
  cld_for_September_EISopt_1000.png  </p>
  
  <p>And I want to have a text file with this inside:<br>
  cld_for_January_EISopt_1000.png<br>
  cld_for_February_EISopt_1000.png<br>
  cld_for_March_EISopt_1000.png<br>
  cld_for_April_EISopt_1000.png<br>
  cld_for_May_EISopt_1000.png<br>
  cld_for_June_EISopt_1000.png<br>
  cld_for_July_EISopt_1000.png<br>
  cld_for_August_EISopt_1000.png<br>
  cld_for_September_EISopt_1000.png<br>
  cld_for_October_EISopt_1000.png<br>
  cld_for_November_EISopt_1000.png<br>
  cld_for_December_EISopt_1000.png  </p>
  
  <p>Or more generally, if I have a list or an array or a dictionnay like:<br>
  {'pattern1': rank_in_output_list_1, ..., 'pattern12': rank_in_output_list_12}<br>
  how should I do to use it to order my file names?</p>
  
  <p>So far I have played with: os.listdir, os.path.isfile, numpyp.ma.array, .compressed() or .compress() ; but I haven't been so successful.</p>
  
  <p>Thanks a lot.<br>
  Christophe.</p>