add use of docutils for pdf
authorgreg
Wed, 05 Mar 2008 11:43:20 +0100
changeset 126 034979cb02b0
parent 125 13d45f7e0248
child 127 36bb6be88a3b
add use of docutils for pdf
Beremiz.py
plugger.py
--- a/Beremiz.py	Wed Mar 05 10:05:12 2008 +0100
+++ b/Beremiz.py	Wed Mar 05 11:43:20 2008 +0100
@@ -62,15 +62,14 @@
 
 import wx.lib.buttons, wx.lib.statbmp , wx.html
 import types, time, re, platform, time, traceback, commands
-import docclass.docpdf
-
 from plugger import PluginsRoot
 
 base_folder = os.path.split(sys.path[0])[0]
 CanFestivalPath = os.path.join(base_folder, "CanFestival-3")
 sys.path.append(os.path.join(CanFestivalPath, "objdictgen"))
+sys.path.append(os.path.join(base_folder, "docutils"))
 from objdictedit import *
-
+from docpdf import *
 
 SCROLLBAR_UNIT = 10
 WINDOW_COLOUR = wx.Colour(240,240,240)
@@ -1201,7 +1200,7 @@
         event.Skip()
     
     def OnBeremizMenu(self, event):
-        docclass.docpdf.open_pdf(os.path.join(CWD, "doc", "manual_beremiz.pdf"))
+        open_pdf(os.path.join(CWD, "doc", "manual_beremiz.pdf"))
         event.Skip()
     
     def OnAboutMenu(self, event):
--- a/plugger.py	Wed Mar 05 10:05:12 2008 +0100
+++ b/plugger.py	Wed Mar 05 11:43:20 2008 +0100
@@ -12,8 +12,9 @@
 #Quick hack to be able to find Beremiz IEC tools. Should be config params.
 base_folder = os.path.split(sys.path[0])[0]
 sys.path.append(os.path.join(base_folder, "plcopeneditor"))
-
-import docclass.docpdf
+sys.path.append(os.path.join(base_folder, "docutils"))
+
+from docpdf import *
 from xmlclass import GenerateClassesFromXSDstring
 from wxPopen import ProcessLogger
 
@@ -526,7 +527,7 @@
             - a virtual slave node to simulate output block
             """)
             logger.write("\nInfo: For this demo, %s plugin has some special methods to run external programs.\nThese methods are defined in methods.py\n" % (PlugName or "Root"))
-            docclass.docpdf.open_pdf(os.path.join(os.path.split(__file__)[0], "doc", "manual_beremiz.pdf"), pagenum=20)
+            open_pdf(os.path.join(os.path.split(__file__)[0], "doc", "manual_beremiz.pdf"), pagenum=20)
             execfile(methode_name)
 
         # Get the base xml tree