tools/docco/graphdocpy.py
changeset 2978 1e68f6a61dfe
parent 2967 ea62529bd1df
child 3063 c8f085710d21
--- a/tools/docco/graphdocpy.py	Wed Sep 10 17:57:51 2008 +0000
+++ b/tools/docco/graphdocpy.py	Wed Sep 10 22:39:57 2008 +0000
@@ -957,7 +957,12 @@
 
     #if doing the usual, put a copy in docs
     if builder.outPath=='reportlab.graphics.pdf':
-        import shutil, tools
+        import shutil
+        try:
+            import tools
+        except ImportError: #probably running in tools/docco
+            sys.path.insert(0, os.path.dirname(os.path.dirname(os.getcwd())))
+            import tools
         topDir=tools.__path__[0]
         if not os.path.isabs(topDir): topDir=os.path.abspath(topDir)
         topDir=os.path.dirname(topDir)