code: def gen_mapname():
      
      filepath = None
      while (filepath is None) or (os.path.exists(os.path.join(config['mapfiles_dir'], filepath))):
          filepath = '%s.map' % _gen_string()
      return filepath
docs: Generate a uniq mapfile pathname.