pvWebMonitor Package: utils Module#

pvWebMonitor.utils

pvWebMonitor.utils.copyToWebServer(local_file, web_site_path)[source]#

copy local file to web server directory (on a local file system)

This copy routine assumes that it is not necessary to use scp to copy the file.

pvWebMonitor.utils.etree_as_str(tree)[source]#
pvWebMonitor.utils.validate(xml_tree, xml_schema_file)[source]#

validate an XML document tree against an XML Schema file

Parameters:
  • xml_tree (obj) – instance of etree._ElementTree

  • xml_schema_file (str) – name of XML Schema file (local to package directory)

pvWebMonitor.utils.writeFile(output_file, contents)[source]#

write contents to file

Parameters:
  • output_file (str) – file to be written (path is optional)

  • contents (str) – text to write in output_file

pvWebMonitor.utils.xslt_transformation(xslt_file, src_xml_file, result_xml_file)[source]#

transform an XML file using an XSLT

Parameters:
  • xslt_file (str) – name of XSLT file

  • src_xml_file (str) – name of XML file

  • result_xml_file (str) – name of output XML file