import shutil
import urllib
+from util import makedirs
+
class UnicodeException(Exception):
def __str__(self):
XHTMLNS = XMLNamespace("http://www.w3.org/1999/xhtml")
NCXNS = XMLNamespace("http://www.daisy.org/z3986/2005/ncx/")
OPFNS = XMLNamespace("http://www.idpf.org/2007/opf")
+PLMETNS = XMLNamespace("http://dl.psnc.pl/schemas/plmet/")
WLNS = EmptyNamespace()
"""Save file to a path. Create directories, if necessary."""
dirname = os.path.dirname(os.path.abspath(path))
- if not os.path.isdir(dirname):
- os.makedirs(dirname)
+ makedirs(dirname)
shutil.copy(self.get_filename(), path)