From 274192a30b9081fc7b70667b6153d49e54d39901 Mon Sep 17 00:00:00 2001 From: gwen Date: Mon, 25 Jun 2012 16:51:26 +0200 Subject: [PATCH] add autopath to executable doc --- doc/code2html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/code2html b/doc/code2html index be62c7c..5fbd402 100755 --- a/doc/code2html +++ b/doc/code2html @@ -6,6 +6,16 @@ from importlib import import_module root="./build/api" +# autopath + +from os.path import dirname, abspath, join, normpath +import sys + +HERE = dirname(abspath(__file__)) +PATH = normpath(join(HERE, '..', '..')) +if PATH not in sys.path: + sys.path.insert(1, PATH) + htmltmpl = """