From af66630f078a2f197480c27bb5776ce358c2408d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 1 Apr 2010 22:57:26 +0900 Subject: [PATCH] delay beautifulsoup import until export --- anki/exporting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/exporting.py b/anki/exporting.py index 8dbe221d2..773cd6880 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -17,7 +17,6 @@ from anki.lang import _ from anki.utils import findTag, parseTags, stripHTML, ids2str from anki.tags import tagIds from anki.db import * -from BeautifulSoup import BeautifulSoup as BS class Exporter(object): def __init__(self, deck): @@ -33,6 +32,7 @@ class Exporter(object): def escapeText(self, text, removeFields=False): "Escape newlines and tabs, and strip Anki HTML." + from BeautifulSoup import BeautifulSoup as BS text = text.replace("\n", "
") text = text.replace("\t", " " * 8) if removeFields: