Added -n flag (newest first) to invocation of hg in, so that it gives us the most tip-ward revision that would be needed, not the oldest (revision 0 in almost all cases).
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>helium.logger</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="helium-module.html">Package helium</a> ::
Module logger
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="helium.logger-pysrc.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="helium.logger-module.html">Module helium.logger</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#============================================================================ </tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Name : logger.py </tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Part of : Helium </tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment">#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#All rights reserved.</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#This component and the accompanying materials are made available</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#under the terms of the License "Eclipse Public License v1.0"</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#which accompanies this distribution, and is available</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#at the URL "http://www.eclipse.org/legal/epl-v10.html".</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Initial Contributors:</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Nokia Corporation - initial contribution.</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Contributors:</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#Description:</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#===============================================================================</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-comment">##</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Logger module</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Description : Port to python of the ISIS::Logger3 perl module</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 1.0.0 (13/12/2006)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># - First version of the module.</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">##</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-comment"># pylint: disable-msg=E1101,E1103</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">codecs</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Method symrec.MetadataMerger.xml()=symrec.MetadataMerger-class.html#xml,Method symrec.ReleaseMetadata.xml()=symrec.ReleaseMetadata-class.html#xml"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-0', 'xml', 'link-0');">xml</a></tt><tt class="py-op">.</tt><tt class="py-name">dom</tt><tt class="py-op">.</tt><tt class="py-name">minidom</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">datetime</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">os</tt> <tt class="py-keyword">import</tt> <tt class="py-name">popen</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This is an Internal helper call. </tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="_CustomizePrint"></a><div id="_CustomizePrint-def"><a name="L39"></a><tt class="py-lineno"> 39</tt> <a class="py-toggle" href="#" id="_CustomizePrint-toggle" onclick="return toggle('_CustomizePrint');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">class</tt> <a class="py-def-name" href="helium.logger._CustomizePrint-class.html">_CustomizePrint</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_CustomizePrint-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_CustomizePrint-expanded"><a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Initialise the instance content </tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param logger a Logger instance</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param name method name (e.g. Print, Error), could be any strings</tt> </tt>
<a name="_CustomizePrint.__init__"></a><div id="_CustomizePrint.__init__-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="_CustomizePrint.__init__-toggle" onclick="return toggle('_CustomizePrint.__init__');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger._CustomizePrint-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">logger</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_CustomizePrint.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_CustomizePrint.__init__-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__logger</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Variable archive.scanners.logger=archive.scanners-module.html#logger,Variable archive.selectors.logger=archive.selectors-module.html#logger,Variable buildmanagement.logger=buildmanagement-module.html#logger,Variable flash_config.logger=flash_config-module.html#logger,Module helium.logger=helium.logger-module.html,Variable imaker.iqrf.logger=imaker.iqrf-module.html#logger,Variable integration.templatebuilder.logger=integration.templatebuilder-module.html#logger,Variable rom.logger=rom-module.html#logger"><a title="archive.scanners.logger
archive.selectors.logger
buildmanagement.logger
flash_config.logger
helium.logger
imaker.iqrf.logger
integration.templatebuilder.logger
rom.logger" class="py-name" href="#" onclick="return doclink('link-1', 'logger', 'link-1');">logger</a></tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name" targets="Method buildtools.Command.name()=buildtools.Command-class.html#name,Method ccm.FourPartName.name()=ccm.FourPartName-class.html#name,Method symrec.ServicePack.name()=symrec.ServicePack-class.html#name,Method sysdef.api.Configuration.name()=sysdef.api.Configuration-class.html#name,Method sysdef.api.Option.name()=sysdef.api.Option-class.html#name,Method sysdef.api.SpecialInstruction.name()=sysdef.api.SpecialInstruction-class.html#name,Method sysdef.api.Target.name()=sysdef.api.Target-class.html#name,Method sysdef.api.TargetList.name()=sysdef.api.TargetList-class.html#name,Method sysdef.api.Unit.name()=sysdef.api.Unit-class.html#name,Method sysdef.api._UnitGroup.name()=sysdef.api._UnitGroup-class.html#name"><a title="buildtools.Command.name
ccm.FourPartName.name
symrec.ServicePack.name
sysdef.api.Configuration.name
sysdef.api.Option.name
sysdef.api.SpecialInstruction.name
sysdef.api.Target.name
sysdef.api.TargetList.name
sysdef.api.Unit.name
sysdef.api._UnitGroup.name" class="py-name" href="#" onclick="return doclink('link-2', 'name', 'link-2');">name</a></tt> </tt>
</div><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Make this object callable. Call _print from the logger instance.</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @params *args a list of arguments</tt> </tt>
<a name="_CustomizePrint.__call__"></a><div id="_CustomizePrint.__call__-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="_CustomizePrint.__call__-toggle" onclick="return toggle('_CustomizePrint.__call__');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger._CustomizePrint-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_CustomizePrint.__call__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_CustomizePrint.__call__-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__logger</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method helium.logger.Logger._print()=helium.logger.Logger-class.html#_print"><a title="helium.logger.Logger._print" class="py-name" href="#" onclick="return doclink('link-3', '_print', 'link-3');">_print</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__name</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-comment">##</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># The Logger enables to create xml logging in Python.</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="Logger"></a><div id="Logger-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="Logger-toggle" onclick="return toggle('Logger');">-</a><tt class="py-line"><tt class="py-comment"></tt><tt class="py-keyword">class</tt> <a class="py-def-name" href="helium.logger.Logger-class.html">Logger</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Logger-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Constructor of the Logger.</tt> </tt>
<a name="Logger.__init__"></a><div id="Logger.__init__-def"><a name="L62"></a><tt class="py-lineno"> 62</tt> <a class="py-toggle" href="#" id="Logger.__init__-toggle" onclick="return toggle('Logger.__init__');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.__init__-expanded"><a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__step</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-4', 'xml', 'link-0');">xml</a></tt><tt class="py-op">.</tt><tt class="py-name">dom</tt><tt class="py-op">.</tt><tt class="py-name">minidom</tt><tt class="py-op">.</tt><tt class="py-name">Document</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__log"</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__header</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__header"</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__footer"</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__summary</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__summary"</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__header</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__summary</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"date"</tt><tt class="py-op">,</tt> <tt class="py-string">"%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">ctime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"title"</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"subtitle"</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__build</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"build"</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__build</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__build</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__stack</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__verbose</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-comment">#<__log date="Wed Dec 6 03:07:25 2006"></tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Set the url of interface to use.</tt> </tt>
<a name="Logger.SetInterface"></a><div id="Logger.SetInterface-def"><a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="Logger.SetInterface-toggle" onclick="return toggle('Logger.SetInterface');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetInterface">SetInterface</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetInterface-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetInterface-expanded"><a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"interface"</tt><tt class="py-op">,</tt> <tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
</div><a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Enable/Disable shell output</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param v boolean to set the logger output</tt> </tt>
<a name="Logger.SetVerbose"></a><div id="Logger.SetVerbose-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="Logger.SetVerbose-toggle" onclick="return toggle('Logger.SetVerbose');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetVerbose">SetVerbose</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">v</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetVerbose-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetVerbose-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__verbose</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
</div><a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Set the title of the document</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param title the title to set</tt> </tt>
<a name="Logger.SetTitle"></a><div id="Logger.SetTitle-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="Logger.SetTitle-toggle" onclick="return toggle('Logger.SetTitle');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetTitle">SetTitle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__header</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"title"</tt><tt class="py-op">,</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
</div><a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Set the subtitle of the document</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param subtitle the subtitle to set</tt> </tt>
<a name="Logger.SetSubTitle"></a><div id="Logger.SetSubTitle-def"><a name="L103"></a><tt class="py-lineno">103</tt> <a class="py-toggle" href="#" id="Logger.SetSubTitle-toggle" onclick="return toggle('Logger.SetSubTitle');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetSubTitle">SetSubTitle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__header</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"subtitle"</tt><tt class="py-op">,</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
</div><a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Set the sumamry title</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param title the title to set</tt> </tt>
<a name="Logger.SetSummaryTitle"></a><div id="Logger.SetSummaryTitle-def"><a name="L109"></a><tt class="py-lineno">109</tt> <a class="py-toggle" href="#" id="Logger.SetSummaryTitle-toggle" onclick="return toggle('Logger.SetSummaryTitle');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetSummaryTitle">SetSummaryTitle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetSummaryTitle-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetSummaryTitle-expanded"><a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__summary</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"title"</tt><tt class="py-op">,</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
</div><a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Creates a summary couple.</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param tag the description</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param value the value</tt> </tt>
<a name="Logger.AddSummaryElement"></a><div id="Logger.AddSummaryElement-def"><a name="L116"></a><tt class="py-lineno">116</tt> <a class="py-toggle" href="#" id="Logger.AddSummaryElement-toggle" onclick="return toggle('Logger.AddSummaryElement');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#AddSummaryElement">AddSummaryElement</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">tag</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.AddSummaryElement-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.AddSummaryElement-expanded"><a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__elmt"</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"tag"</tt><tt class="py-op">,</tt> <tt class="py-name">tag</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"val"</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__summary</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
</div><a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Open a MainContent section.</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param title title of the MainContent section</tt> </tt>
<a name="Logger.OpenMainContent"></a><div id="Logger.OpenMainContent-def"><a name="L126"></a><tt class="py-lineno">126</tt> <a class="py-toggle" href="#" id="Logger.OpenMainContent-toggle" onclick="return toggle('Logger.OpenMainContent');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#OpenMainContent">OpenMainContent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.OpenMainContent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.OpenMainContent-expanded"><a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__stack</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method ccm.Folder.append()=ccm.Folder-class.html#append,Method ccm.Task.append()=ccm.Task-class.html#append"><a title="ccm.Folder.append
ccm.Task.append" class="py-name" href="#" onclick="return doclink('link-5', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"task"</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"name"</tt><tt class="py-op">,</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"type"</tt><tt class="py-op">,</tt> <tt class="py-string">"maincontent"</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"time"</tt><tt class="py-op">,</tt> <tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">ctime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__verbose</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"---------------------------------------------------------------------"</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">" %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"---------------------------------------------------------------------"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Close the current main content section.</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Make sure you have closed other Event/Section first</tt> </tt>
<a name="Logger.CloseMainContent"></a><div id="Logger.CloseMainContent-def"><a name="L143"></a><tt class="py-lineno">143</tt> <a class="py-toggle" href="#" id="Logger.CloseMainContent-toggle" onclick="return toggle('Logger.CloseMainContent');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#CloseMainContent">CloseMainContent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.CloseMainContent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.CloseMainContent-expanded"><a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">nodeName</tt> <tt class="py-op">!=</tt> <tt class="py-string">"task"</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'type'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">"maincontent"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">"not closing a 'maincontent' typed node"</tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__stack</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method log2xml.Stack.pop()=log2xml.Stack-class.html#pop"><a title="log2xml.Stack.pop" class="py-name" href="#" onclick="return doclink('link-6', 'pop', 'link-6');">pop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Create an Event section (can be opened/closed)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param title title of the MainContent section</tt> </tt>
<a name="Logger.OpenEvent"></a><div id="Logger.OpenEvent-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="Logger.OpenEvent-toggle" onclick="return toggle('Logger.OpenEvent');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#OpenEvent">OpenEvent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">=</tt><tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.OpenEvent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.OpenEvent-expanded"><a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__stack</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="ccm.Folder.append
ccm.Task.append" class="py-name" href="#" onclick="return doclink('link-7', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"task"</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"name"</tt><tt class="py-op">,</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"type"</tt><tt class="py-op">,</tt> <tt class="py-string">"event"</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"time"</tt><tt class="py-op">,</tt> <tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">datetime</tt><tt class="py-op">.</tt><tt class="py-name">now</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">ctime</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__verbose</tt><tt class="py-op">:</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"---------------------------------------------------------------------"</tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">" + %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
</div><a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> </tt>
<a name="Logger.SetCustomOutputer"></a><div id="Logger.SetCustomOutputer-def"><a name="L164"></a><tt class="py-lineno">164</tt> <a class="py-toggle" href="#" id="Logger.SetCustomOutputer-toggle" onclick="return toggle('Logger.SetCustomOutputer');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetCustomOutputer">SetCustomOutputer</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">type</tt><tt class="py-op">,</tt> <tt class="py-param">classname</tt><tt class="py-op">,</tt> <tt class="py-param">config</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetCustomOutputer-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetCustomOutputer-expanded"><a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"__customoutputer"</tt><tt class="py-op">)</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"type"</tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Method ccm.FourPartName.type()=ccm.FourPartName-class.html#type"><a title="ccm.FourPartName.type" class="py-name" href="#" onclick="return doclink('link-8', 'type', 'link-8');">type</a></tt><tt class="py-op">)</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"module"</tt><tt class="py-op">,</tt> <tt class="py-name">classname</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">config</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__lognode</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Close the current Event</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Make sure you have closed other Event/Section first</tt> </tt>
<a name="Logger.CloseEvent"></a><div id="Logger.CloseEvent-def"><a name="L175"></a><tt class="py-lineno">175</tt> <a class="py-toggle" href="#" id="Logger.CloseEvent-toggle" onclick="return toggle('Logger.CloseEvent');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#CloseEvent">CloseEvent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.CloseEvent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.CloseEvent-expanded"><a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">nodeName</tt> <tt class="py-op">!=</tt> <tt class="py-string">"task"</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'type'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">"event"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">"not closing a 'event' typed node"</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__stack</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="log2xml.Stack.pop" class="py-name" href="#" onclick="return doclink('link-9', 'pop', 'link-6');">pop</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># __getattribute__ has been overrided to enable dynamic messaging.</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param attr the name of the method (or attribute...)</tt> </tt>
<a name="Logger.__getattribute__"></a><div id="Logger.__getattribute__-def"><a name="L183"></a><tt class="py-lineno">183</tt> <a class="py-toggle" href="#" id="Logger.__getattribute__-toggle" onclick="return toggle('Logger.__getattribute__');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#__getattribute__">__getattribute__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">attr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.__getattribute__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.__getattribute__-expanded"><a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">object</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method helium.logger.Logger.__getattribute__()=helium.logger.Logger-class.html#__getattribute__"><a title="helium.logger.Logger.__getattribute__" class="py-name" href="#" onclick="return doclink('link-10', '__getattribute__', 'link-10');">__getattribute__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-11" class="py-name" targets="Class helium.logger._CustomizePrint=helium.logger._CustomizePrint-class.html"><a title="helium.logger._CustomizePrint" class="py-name" href="#" onclick="return doclink('link-11', '_CustomizePrint', 'link-11');">_CustomizePrint</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
</div><a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Generic method that handle the print in the XML document</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param kind type of output</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param *args a list of arguments (must be strings)</tt> </tt>
<a name="Logger._print"></a><div id="Logger._print-def"><a name="L193"></a><tt class="py-lineno">193</tt> <a class="py-toggle" href="#" id="Logger._print-toggle" onclick="return toggle('Logger._print');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#_print">_print</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">kind</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger._print-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger._print-expanded"><a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt id="link-12" class="py-name" targets="Variable ccm.Result.output=ccm.Result-class.html#output,Package helium.output=helium.output-module.html"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-12', 'output', 'link-12');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-string">u""</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">x</tt><tt class="py-op">:</tt> <tt class="py-string">u"%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> <tt class="py-name">nodetype</tt> <tt class="py-op">=</tt> <tt class="py-name">kind</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-name">msgtype</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">nodetype</tt> <tt class="py-op">!=</tt> <tt class="py-string">"print"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">nodetype</tt> <tt class="py-op">!=</tt> <tt class="py-string">"info"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">nodetype</tt> <tt class="py-op">!=</tt> <tt class="py-string">"debug"</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-name">msgtype</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s:"</tt> <tt class="py-op">%</tt> <tt class="py-name">nodetype</tt><tt class="py-op">.</tt><tt class="py-name">upper</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__verbose</tt><tt class="py-op">:</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-string">"%s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">msgtype</tt><tt class="py-op">,</tt> <tt id="link-13" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-13', 'output', 'link-12');">output</a></tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createElementNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"message"</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">setAttributeNS</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">,</tt> <tt class="py-string">"priority"</tt><tt class="py-op">,</tt> <tt class="py-name">nodetype</tt><tt class="py-op">)</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-comment">#n.setAttributeNS("", "time", datetime.datetime.now().ctime())</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">n</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">createCDATASection</tt><tt class="py-op">(</tt><tt id="link-14" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-14', 'output', 'link-12');">output</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__current_node</tt><tt class="py-op">.</tt><tt class="py-name">appendChild</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"><tt class="py-comment"># nodetype = kind.lower()</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># if kind.lower() != "print" and kind.lower() != "printraw":</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># nodename = kind.lower()</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># if nodename=="__print" and self.__current_node.lastChild!=None and self.__current_node.lastChild.nodeName == nodename:</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># self.__current_node.lastChild.appendChild(self.__doc.createTextNode("".join(*args).decode('iso-8859-1')))</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># else:</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># n = self.__doc.createElementNS("", nodename)</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># n.setAttributeNS("", "step", "%d" % self.__step)</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># self.__step += 1</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># n.setAttributeNS("", "time", datetime.datetime.now().ctime())</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># text_content = "".join(map(lambda x: str(x), list(*args))).decode('iso-8859-1')</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># n.appendChild(self.__doc.createTextNode(text_content))</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># self.__current_node.appendChild(n)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment">#</tt> </tt>
<a name="Logger.SetFooterTitle"></a><div id="Logger.SetFooterTitle-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="Logger.SetFooterTitle-toggle" onclick="return toggle('Logger.SetFooterTitle');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetFooterTitle">SetFooterTitle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetFooterTitle-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetFooterTitle-expanded"><a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'title'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">title</tt> </tt>
</div><a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> </tt>
<a name="Logger.SetFooterSubTitle"></a><div id="Logger.SetFooterSubTitle-def"><a name="L229"></a><tt class="py-lineno">229</tt> <a class="py-toggle" href="#" id="Logger.SetFooterSubTitle-toggle" onclick="return toggle('Logger.SetFooterSubTitle');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#SetFooterSubTitle">SetFooterSubTitle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">subtitle</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.SetFooterSubTitle-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.SetFooterSubTitle-expanded"><a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__footer</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-string">'subtitle'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">subtitle</tt> </tt>
</div><a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> </tt>
<a name="Logger.Die"></a><div id="Logger.Die-def"><a name="L232"></a><tt class="py-lineno">232</tt> <a class="py-toggle" href="#" id="Logger.Die-toggle" onclick="return toggle('Logger.Die');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#Die">Die</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">title</tt><tt class="py-op">,</tt> <tt class="py-param">subtitle</tt><tt class="py-op">,</tt> <tt class="py-param">exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Logger.Die-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Logger.Die-expanded"><a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method helium.logger.Logger.SetFooterTitle()=helium.logger.Logger-class.html#SetFooterTitle"><a title="helium.logger.Logger.SetFooterTitle" class="py-name" href="#" onclick="return doclink('link-15', 'SetFooterTitle', 'link-15');">SetFooterTitle</a></tt><tt class="py-op">(</tt><tt class="py-name">title</tt><tt class="py-op">)</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method helium.logger.Logger.SetFooterSubTitle()=helium.logger.Logger-class.html#SetFooterSubTitle"><a title="helium.logger.Logger.SetFooterSubTitle" class="py-name" href="#" onclick="return doclink('link-16', 'SetFooterSubTitle', 'link-16');">SetFooterSubTitle</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s\nException raised: %s\n%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">subtitle</tt><tt class="py-op">,</tt> <tt class="py-name">exception</tt><tt class="py-op">,</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">format_exc</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Write the DOM tree into a file.</tt> </tt>
<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param filename the file to write in.</tt> </tt>
<a name="Logger.WriteToFile"></a><div id="Logger.WriteToFile-def"><a name="L239"></a><tt class="py-lineno">239</tt> <a class="py-toggle" href="#" id="Logger.WriteToFile-toggle" onclick="return toggle('Logger.WriteToFile');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#WriteToFile">WriteToFile</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-name">file_object</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-17" class="py-name" targets="Variable symrec.ReleaseMetadata.filename=symrec.ReleaseMetadata-class.html#filename"><a title="symrec.ReleaseMetadata.filename" class="py-name" href="#" onclick="return doclink('link-17', 'filename', 'link-17');">filename</a></tt><tt class="py-op">,</tt> <tt class="py-string">"w"</tt><tt class="py-op">)</tt> </tt>
<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"> <tt class="py-name">file_object</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method archive.builders.ArchivePreBuilder.write()=archive.builders.ArchivePreBuilder-class.html#write,Method build.model.BOMDeltaXMLWriter.write()=build.model.BOMDeltaXMLWriter-class.html#write,Method build.model.BOMXMLWriter.write()=build.model.BOMXMLWriter-class.html#write,Method buildtools.AbstractOutputWriter.write()=buildtools.AbstractOutputWriter-class.html#write,Method buildtools.AntWriter.write()=buildtools.AntWriter-class.html#write,Method buildtools.EBSWriter.write()=buildtools.EBSWriter-class.html#write,Method buildtools.MakeWriter.write()=buildtools.MakeWriter-class.html#write,Method buildtools.StringWriter.write()=buildtools.StringWriter-class.html#write,Method flash_config.FlashConfigurationWriter.write()=flash_config.FlashConfigurationWriter-class.html#write,Method helium.documentation.APIDeltaWriter.write()=helium.documentation.APIDeltaWriter-class.html#write,Method sis.SisPreBuilder.write()=sis.SisPreBuilder-class.html#write,Method sysdef.io.FlashImageSizeWriter.write()=sysdef.io.FlashImageSizeWriter-class.html#write,Method sysdef.io.MakeWriter.write()=sysdef.io.MakeWriter-class.html#write,Method sysdef.io.MakeWriter2.write()=sysdef.io.MakeWriter2-class.html#write,Method sysdef.io.MakeWriter3.write()=sysdef.io.MakeWriter3-class.html#write,Method version.Version.write()=version.Version-class.html#write"><a title="archive.builders.ArchivePreBuilder.write
build.model.BOMDeltaXMLWriter.write
build.model.BOMXMLWriter.write
buildtools.AbstractOutputWriter.write
buildtools.AntWriter.write
buildtools.EBSWriter.write
buildtools.MakeWriter.write
buildtools.StringWriter.write
flash_config.FlashConfigurationWriter.write
helium.documentation.APIDeltaWriter.write
sis.SisPreBuilder.write
sysdef.io.FlashImageSizeWriter.write
sysdef.io.MakeWriter.write
sysdef.io.MakeWriter2.write
sysdef.io.MakeWriter3.write
version.Version.write" class="py-name" href="#" onclick="return doclink('link-18', 'write', 'link-18');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">codecs</tt><tt class="py-op">.</tt><tt class="py-name">BOM_UTF8</tt><tt class="py-op">)</tt> </tt>
<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"> <tt class="py-name">file_object</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="archive.builders.ArchivePreBuilder.write
build.model.BOMDeltaXMLWriter.write
build.model.BOMXMLWriter.write
buildtools.AbstractOutputWriter.write
buildtools.AntWriter.write
buildtools.EBSWriter.write
buildtools.MakeWriter.write
buildtools.StringWriter.write
flash_config.FlashConfigurationWriter.write
helium.documentation.APIDeltaWriter.write
sis.SisPreBuilder.write
sysdef.io.FlashImageSizeWriter.write
sysdef.io.MakeWriter.write
sysdef.io.MakeWriter2.write
sysdef.io.MakeWriter3.write
version.Version.write" class="py-name" href="#" onclick="return doclink('link-19', 'write', 'link-18');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">toprettyxml</tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-string">"utf-8"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> <tt class="py-name">file_object</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method build.model.BOM.close()=build.model.BOM-class.html#close,Method build.model.SessionCreator.close()=build.model.SessionCreator-class.html#close,Method buildtools.AbstractOutputWriter.close()=buildtools.AbstractOutputWriter-class.html#close,Method ccm.AbstractSession.close()=ccm.AbstractSession-class.html#close,Method ccm.Session.close()=ccm.Session-class.html#close,Method ccm.SessionPool.close()=ccm.SessionPool-class.html#close,Method ccm.extra.CachedSessionProvider.close()=ccm.extra.CachedSessionProvider-class.html#close,Method ccm.extra.SessionProvider.close()=ccm.extra.SessionProvider-class.html#close,Method log2xml.LogWriter.close()=log2xml.LogWriter-class.html#close,Method preparation.PreparationBuilder.close()=preparation.PreparationBuilder-class.html#close,Method sysdef.io.FlashImageSizeWriter.close()=sysdef.io.FlashImageSizeWriter-class.html#close"><a title="build.model.BOM.close
build.model.SessionCreator.close
buildtools.AbstractOutputWriter.close
ccm.AbstractSession.close
ccm.Session.close
ccm.SessionPool.close
ccm.extra.CachedSessionProvider.close
ccm.extra.SessionProvider.close
log2xml.LogWriter.close
preparation.PreparationBuilder.close
sysdef.io.FlashImageSizeWriter.close" class="py-name" href="#" onclick="return doclink('link-20', 'close', 'link-20');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"> </tt>
<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> </tt>
<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-comment">##</tt> </tt>
<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># Write the DOM tree into a file.</tt> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># @param filename the file to write in.</tt> </tt>
<a name="Logger.__str__"></a><div id="Logger.__str__-def"><a name="L249"></a><tt class="py-lineno">249</tt> <a class="py-toggle" href="#" id="Logger.__str__-toggle" onclick="return toggle('Logger.__str__');">-</a><tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">def</tt> <a class="py-def-name" href="helium.logger.Logger-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__doc</tt><tt class="py-op">.</tt><tt class="py-name">toprettyxml</tt><tt class="py-op">(</tt><tt class="py-name">encoding</tt><tt class="py-op">=</tt><tt class="py-string">"utf-8"</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<th class="navbar" width="100%"></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:24 2009
</td>
<td align="right" class="footer">
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie()
// -->
</script>
</body>
</html>