def get_mapnikMap(mapfile):
 mmap = mapnik.Map(0, 0)
 if exists(mapfile):
  mapnik.load_map(mmap, str(mapfile))
 else:
  (handle, filename) = mkstemp()
  os.write(handle, urlopen(mapfile).read())
  os.close(handle)
  mapnik.load_map(mmap, filename)
  os.unlink(filename)
 return mmap

def get_mapnikMap ( mapfile ) : mmap = mapnik . Map ( 0 , 0 ) if exists ( mapfile ) : mapnik . load_map ( mmap , str ( mapfile ) ) else : ( handle , filename ) = mkstemp ( ) os . write ( handle , urlopen ( mapfile ) . read ( ) ) os . close ( handle ) mapnik . load_map ( mmap , filename ) os . unlink ( filename ) return mmap
get a new mapnik .