#NEWLINE# def save_html( fig = None , fileobj = '_map.html' , **kwargs ) : #NEWLINE# #INDENT# if isinstance ( fileobj , str ) : #NEWLINE# #INDENT# fileobj = open ( fileobj , 'w' ) #NEWLINE# #UNINDENT# if ( not hasattr ( kwargs , 'write' ) ) : #NEWLINE# #INDENT# raise ValueError ( 'fileobj should be a filename or a writable file' ) #NEWLINE# #UNINDENT# html = fig_to_html ( fig , ** kwargs ) #NEWLINE# fileobj . write ( html ) #NEWLINE# fileobj . close ( )