equal
deleted
inserted
replaced
338 |
338 |
339 svgfile = self._getSVGpath() |
339 svgfile = self._getSVGpath() |
340 |
340 |
341 res = ([], "", False) |
341 res = ([], "", False) |
342 |
342 |
343 target_fname = "sghmi_"+location_str+".xhtml" |
343 target_fname = "svghmi_"+location_str+".xhtml" |
344 |
344 |
345 target_path = os.path.join(self._getBuildPath(), target_fname) |
345 target_path = os.path.join(self._getBuildPath(), target_fname) |
346 target_file = open(target_path, 'w') |
346 target_file = open(target_path, 'wb') |
347 |
347 |
348 if os.path.exists(svgfile): |
348 if os.path.exists(svgfile): |
349 |
349 |
350 # TODO : move to __init__ |
350 # TODO : move to __init__ |
351 transform = XSLTransform(os.path.join(ScriptDirectory, "gen_index_xhtml.xslt"), |
351 transform = XSLTransform(os.path.join(ScriptDirectory, "gen_index_xhtml.xslt"), |
383 |
383 |
384 runtimefile_path = os.path.join(buildpath, "runtime_svghmi1_%s.py" % location_str) |
384 runtimefile_path = os.path.join(buildpath, "runtime_svghmi1_%s.py" % location_str) |
385 runtimefile = open(runtimefile_path, 'w') |
385 runtimefile = open(runtimefile_path, 'w') |
386 runtimefile.write(""" |
386 runtimefile.write(""" |
387 def _runtime_svghmi1_%(location)s_start(): |
387 def _runtime_svghmi1_%(location)s_start(): |
388 svghmi_root.putChild('%(view_name)s',File('%(xhtml)s')) |
388 svghmi_root.putChild('%(view_name)s',File('%(xhtml)s', defaultType='application/xhtml+xml')) |
389 |
389 |
390 def _runtime_svghmi1_%(location)s_stop(): |
390 def _runtime_svghmi1_%(location)s_stop(): |
391 svghmi_root.delEntity('%(view_name)s') |
391 svghmi_root.delEntity('%(view_name)s') |
392 |
392 |
393 """ % {"location": location_str, |
393 """ % {"location": location_str, |