Catchup of Shabe's Helium7 work.
<?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>localisation</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">
Module localisation
</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="localisation-pysrc.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Source Code for <a href="localisation-module.html">Module localisation</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 : localisation.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-docstring">""" Localisation related function. </tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring"> * Parsing of languages.xml</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">amara</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module bsf=bsf-module.html"><a title="bsf" class="py-name" href="#" onclick="return doclink('link-0', 'bsf', 'link-0');">bsf</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Method buildtools.Command.path()=buildtools.Command-class.html#path,Method sysdef.api.SpecialInstruction.path()=sysdef.api.SpecialInstruction-class.html#path,Method sysdef.api.Unit.path()=sysdef.api.Unit-class.html#path"><a title="buildtools.Command.path
sysdef.api.SpecialInstruction.path
sysdef.api.Unit.path" class="py-name" href="#" onclick="return doclink('link-1', 'path', 'link-1');">path</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> </tt>
<a name="Languages"></a><div id="Languages-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="Languages-toggle" onclick="return toggle('Languages');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="localisation.Languages-class.html">Languages</a><tt class="py-op">:</tt> </tt>
</div><div id="Languages-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Languages-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"> <tt class="py-docstring">""" Languages.xml file parser. """</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"> </tt>
<a name="Languages.__init__"></a><div id="Languages.__init__-def"><a name="L32"></a><tt class="py-lineno"> 32</tt> <a class="py-toggle" href="#" id="Languages.__init__-toggle" onclick="return toggle('Languages.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-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">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Languages.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Languages.__init__-expanded"><a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__filename</tt> <tt class="py-op">=</tt> <tt id="link-2" 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-2', 'filename', 'link-2');">filename</a></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__xml</tt> <tt class="py-op">=</tt> <tt class="py-name">amara</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method bsf.BSF.parse()=bsf.BSF-class.html#parse,Method symbian.log.Parser.parse()=symbian.log.Parser-class.html#parse"><a title="bsf.BSF.parse
symbian.log.Parser.parse" class="py-name" href="#" onclick="return doclink('link-3', 'parse', 'link-3');">parse</a></tt><tt class="py-op">(</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt id="link-4" class="py-name"><a title="symrec.ReleaseMetadata.filename" class="py-name" href="#" onclick="return doclink('link-4', 'filename', 'link-2');">filename</a></tt><tt class="py-op">,</tt><tt class="py-string">"r"</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"> </tt>
<a name="Languages.get_language_ids"></a><div id="Languages.get_language_ids-def"><a name="L36"></a><tt class="py-lineno"> 36</tt> <a class="py-toggle" href="#" id="Languages.get_language_ids-toggle" onclick="return toggle('Languages.get_language_ids');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-class.html#get_language_ids">get_language_ids</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="Languages.get_language_ids-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Languages.get_language_ids-expanded"><a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> <tt class="py-docstring">""" returns languages id list """</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__xml</tt><tt class="py-op">.</tt><tt class="py-name">xml_xpath</tt><tt class="py-op">(</tt><tt class="py-string">"/languages/language"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt class="py-name">result</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">language</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method sysdef.api.Unit.id()=sysdef.api.Unit-class.html#id"><a title="sysdef.api.Unit.id" class="py-name" href="#" onclick="return doclink('link-6', 'id', 'link-6');">id</a></tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div><a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> </tt>
<a name="Languages.get_name"></a><div id="Languages.get_name-def"><a name="L44"></a><tt class="py-lineno"> 44</tt> <a class="py-toggle" href="#" id="Languages.get_name-toggle" onclick="return toggle('Languages.get_name');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-class.html#get_name">get_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Languages.get_name-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Languages.get_name-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt class="py-docstring">""" returns languages id list """</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__xml</tt><tt class="py-op">.</tt><tt class="py-name">xml_xpath</tt><tt class="py-op">(</tt><tt class="py-string">"/languages/language[@id='%s']"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">language</tt><tt class="py-op">.</tt><tt id="link-7" 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-7', 'name', 'link-7');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> </tt>
<a name="Languages.get_attribute"></a><div id="Languages.get_attribute-def"><a name="L49"></a><tt class="py-lineno"> 49</tt> <a class="py-toggle" href="#" id="Languages.get_attribute-toggle" onclick="return toggle('Languages.get_attribute');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-class.html#get_attribute">get_attribute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lid</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">default</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="Languages.get_attribute-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Languages.get_attribute-expanded"><a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"> <tt class="py-docstring">""" returns the value for a specific language attribute name. It returns default if not found. """</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">language</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__xml</tt><tt class="py-op">.</tt><tt class="py-name">xml_xpath</tt><tt class="py-op">(</tt><tt class="py-string">"/languages/language[@id='%s']/%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt id="link-8" class="py-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-8', 'name', 'link-7');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">language</tt><tt class="py-op">.</tt><tt class="py-name">xml_child_text</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">default</tt> </tt>
</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>
<a name="Languages.get_fallbacks"></a><div id="Languages.get_fallbacks-def"><a name="L56"></a><tt class="py-lineno"> 56</tt> <a class="py-toggle" href="#" id="Languages.get_fallbacks-toggle" onclick="return toggle('Languages.get_fallbacks');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-class.html#get_fallbacks">get_fallbacks</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> <tt class="py-docstring">""" Return the list of available fallbacks</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring"> None if not any.</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-name">string</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method localisation.Languages.get_attribute()=localisation.Languages-class.html#get_attribute"><a title="localisation.Languages.get_attribute" class="py-name" href="#" onclick="return doclink('link-9', 'get_attribute', 'link-9');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-string">'fallbacks'</tt><tt class="py-op">)</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">string</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> </tt>
<a name="Languages.find_first_fallback"></a><div id="Languages.find_first_fallback-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="Languages.find_first_fallback-toggle" onclick="return toggle('Languages.find_first_fallback');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation.Languages-class.html#find_first_fallback">find_first_fallback</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lid</tt><tt class="py-op">,</tt> <tt class="py-param">exists</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Languages.find_first_fallback-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Languages.find_first_fallback-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-docstring">""" Find recursively the first reasonable alternative</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-docstring"> lid the language id</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-docstring"> exists an existance function that takes a language id</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-docstring"> as parameter and return a boolean</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt id="link-10" class="py-name" targets="Method ccm.CCMObject.exists()=ccm.CCMObject-class.html#exists"><a title="ccm.CCMObject.exists" class="py-name" href="#" onclick="return doclink('link-10', 'exists', 'link-10');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</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-keyword">return</tt> <tt class="py-name">lid</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt class="py-comment"># get fallback list</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">fallbacks</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method localisation.Languages.get_fallbacks()=localisation.Languages-class.html#get_fallbacks"><a title="localisation.Languages.get_fallbacks" class="py-name" href="#" onclick="return doclink('link-11', 'get_fallbacks', 'link-11');">get_fallbacks</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">fallbacks</tt> <tt class="py-op">==</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">fallback</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fallbacks</tt><tt class="py-op">:</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-12" class="py-name"><a title="ccm.CCMObject.exists" class="py-name" href="#" onclick="return doclink('link-12', 'exists', 'link-10');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">fallback</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">fallback</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">fallback</tt> <tt class="py-keyword">in</tt> <tt class="py-name">fallbacks</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-name">ffallback</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method localisation.Languages.find_first_fallback()=localisation.Languages-class.html#find_first_fallback"><a title="localisation.Languages.find_first_fallback" class="py-name" href="#" onclick="return doclink('link-13', 'find_first_fallback', 'link-13');">find_first_fallback</a></tt><tt class="py-op">(</tt><tt class="py-name">fallback</tt><tt class="py-op">)</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">ffallback</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">ffallback</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> </tt>
<a name="get_all_variations"></a><div id="get_all_variations-def"><a name="L93"></a><tt class="py-lineno"> 93</tt> <a class="py-toggle" href="#" id="get_all_variations-toggle" onclick="return toggle('get_all_variations');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation-module.html#get_all_variations">get_all_variations</a><tt class="py-op">(</tt><tt class="py-param">languages_xml</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_all_variations-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_all_variations-expanded"><a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-docstring">""" Returns a list of all regional variations supported by platform. """</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-name">variations</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'western'</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">}</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt id="link-14" 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-14', 'xml', 'link-14');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-15" class="py-name" targets="Class localisation.Languages=localisation.Languages-class.html"><a title="localisation.Languages" class="py-name" href="#" onclick="return doclink('link-15', 'Languages', 'link-15');">Languages</a></tt><tt class="py-op">(</tt><tt class="py-name">languages_xml</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">lid</tt> <tt class="py-keyword">in</tt> <tt id="link-16" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-16', 'xml', 'link-14');">xml</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method localisation.Languages.get_language_ids()=localisation.Languages-class.html#get_language_ids"><a title="localisation.Languages.get_language_ids" class="py-name" href="#" onclick="return doclink('link-17', 'get_language_ids', 'link-17');">get_language_ids</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-name">variations</tt><tt class="py-op">[</tt><tt id="link-18" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-18', 'xml', 'link-14');">xml</a></tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="localisation.Languages.get_attribute" class="py-name" href="#" onclick="return doclink('link-19', 'get_attribute', 'link-9');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-string">'core'</tt><tt class="py-op">,</tt> <tt class="py-string">'western'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">variations</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method ccm.CCMObject.keys()=ccm.CCMObject-class.html#keys,Method configuration.Configuration.keys()=configuration.Configuration-class.html#keys,Method configuration.NestedConfiguration.keys()=configuration.NestedConfiguration-class.html#keys,Method symrec.ReleaseMetadata.keys()=symrec.ReleaseMetadata-class.html#keys"><a title="ccm.CCMObject.keys
configuration.Configuration.keys
configuration.NestedConfiguration.keys
symrec.ReleaseMetadata.keys" class="py-name" href="#" onclick="return doclink('link-20', 'keys', 'link-20');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> </tt>
<a name="get_languages_for_variation"></a><div id="get_languages_for_variation-def"><a name="L101"></a><tt class="py-lineno">101</tt> <a class="py-toggle" href="#" id="get_languages_for_variation-toggle" onclick="return toggle('get_languages_for_variation');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation-module.html#get_languages_for_variation">get_languages_for_variation</a><tt class="py-op">(</tt><tt class="py-param">languages_xml</tt><tt class="py-op">,</tt> <tt class="py-param">variation</tt><tt class="py-op">=</tt><tt class="py-string">'western'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_languages_for_variation-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="get_languages_for_variation-expanded"><a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-docstring">""" Returns alist of all supported languages for a specific region. """</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt id="link-21" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-21', 'xml', 'link-14');">xml</a></tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="localisation.Languages" class="py-name" href="#" onclick="return doclink('link-22', 'Languages', 'link-15');">Languages</a></tt><tt class="py-op">(</tt><tt class="py-name">languages_xml</tt><tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">lid</tt> <tt class="py-keyword">in</tt> <tt id="link-23" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-23', 'xml', 'link-14');">xml</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="localisation.Languages.get_language_ids" class="py-name" href="#" onclick="return doclink('link-24', 'get_language_ids', 'link-17');">get_language_ids</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="symrec.MetadataMerger.xml
symrec.ReleaseMetadata.xml" class="py-name" href="#" onclick="return doclink('link-25', 'xml', 'link-14');">xml</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="localisation.Languages.get_attribute" class="py-name" href="#" onclick="return doclink('link-26', 'get_attribute', 'link-9');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-string">'core'</tt><tt class="py-op">,</tt> <tt class="py-string">'western'</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">variation</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="ccm.Folder.append
ccm.Task.append" class="py-name" href="#" onclick="return doclink('link-27', 'append', 'link-5');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">lid</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div><a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> </tt>
<a name="_apply_override"></a><div id="_apply_override-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="_apply_override-toggle" onclick="return toggle('_apply_override');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation-module.html#_apply_override">_apply_override</a><tt class="py-op">(</tt><tt class="py-param">overrides</tt><tt class="py-op">,</tt> <tt class="py-param">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_apply_override-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_apply_override-expanded"><a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-name">res</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method fileutils.AbstractScanner.match()=fileutils.AbstractScanner-class.html#match,Module pathaddition.match=pathaddition.match-module.html"><a title="fileutils.AbstractScanner.match
pathaddition.match" class="py-name" href="#" onclick="return doclink('link-28', 'match', 'link-28');">match</a></tt><tt class="py-op">(</tt><tt class="py-string">r'\s*(data|file)=\s*(\S+)\s+(\S+)'</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">res</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">overrides</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-string">"OVERRIDE: %s => %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">overrides</tt><tt class="py-op">[</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">"%s=%s %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">overrides</tt><tt class="py-op">[</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">line</tt> </tt>
</div><a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> </tt>
<a name="create_locales_iby"></a><div id="create_locales_iby-def"><a name="L119"></a><tt class="py-lineno">119</tt> <a class="py-toggle" href="#" id="create_locales_iby-toggle" onclick="return toggle('create_locales_iby');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation-module.html#create_locales_iby">create_locales_iby</a><tt class="py-op">(</tt><tt class="py-param">product</tt><tt class="py-op">,</tt> <tt class="py-param">lid</tt><tt class="py-op">,</tt> <tt class="py-param">flags</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">prefix</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">suffix</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="create_locales_iby-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="create_locales_iby-expanded"><a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-docstring">""" Function that generates locales_xx.iby into rom product folder.</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">flags</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-name">bsfs</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="bsf" class="py-name" href="#" onclick="return doclink('link-29', 'bsf', 'link-0');">bsf</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Function bsf.read_all()=bsf-module.html#read_all"><a title="bsf.read_all" class="py-name" href="#" onclick="return doclink('link-30', 'read_all', 'link-30');">read_all</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">bsfs</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt id="link-31" class="py-name" targets="Variable symrec.ReleaseMetadata.product=symrec.ReleaseMetadata-class.html#product"><a title="symrec.ReleaseMetadata.product" class="py-name" href="#" onclick="return doclink('link-31', 'product', 'link-31');">product</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</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">"Product not defined, could not find %s.bsf"</tt> <tt class="py-op">%</tt> <tt id="link-32" class="py-name"><a title="symrec.ReleaseMetadata.product" class="py-name" href="#" onclick="return doclink('link-32', 'product', 'link-31');">product</a></tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-name">variantpath</tt> <tt class="py-op">=</tt> <tt class="py-name">bsfs</tt><tt class="py-op">[</tt><tt id="link-33" class="py-name"><a title="symrec.ReleaseMetadata.product" class="py-name" href="#" onclick="return doclink('link-33', 'product', 'link-31');">product</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method bsf.BSF.get_path()=bsf.BSF-class.html#get_path"><a title="bsf.BSF.get_path" class="py-name" href="#" onclick="return doclink('link-34', 'get_path', 'link-34');">get_path</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">lid</tt> <tt class="py-op">==</tt> <tt class="py-string">"sc"</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> <tt class="py-name">outputfile</tt> <tt class="py-op">=</tt> <tt class="py-string">"/epoc32/rom/%s/locales_%s.iby"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">variantpath</tt><tt class="py-op">,</tt> <tt class="py-name">lid</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"Generating %s..."</tt> <tt class="py-op">%</tt> <tt class="py-name">outputfile</tt><tt class="py-op">)</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt id="link-35" 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-35', 'output', 'link-35');">output</a></tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt> <tt class="py-op">(</tt><tt class="py-name">outputfile</tt><tt class="py-op">,</tt> <tt class="py-string">"w+"</tt><tt class="py-op">)</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt id="link-36" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-36', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-37" 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-37', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">"#ifndef __LOCALES_%s_IBY__\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">)</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt id="link-38" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-38', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-39" 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-39', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">"#define __LOCALES_%s_IBY__\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">)</tt> </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-name">args</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">configs</tt> <tt class="py-op">=</tt> <tt class="py-name">bsfs</tt><tt class="py-op">[</tt><tt id="link-40" class="py-name"><a title="symrec.ReleaseMetadata.product" class="py-name" href="#" onclick="return doclink('link-40', 'product', 'link-31');">product</a></tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method bsf.BSF.get_path_as_array()=bsf.BSF-class.html#get_path_as_array"><a title="bsf.BSF.get_path_as_array" class="py-name" href="#" onclick="return doclink('link-41', 'get_path_as_array', 'link-41');">get_path_as_array</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">configs</tt><tt class="py-op">.</tt><tt class="py-name">reverse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">customisation</tt> <tt class="py-keyword">in</tt> <tt class="py-name">configs</tt><tt class="py-op">:</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">args</tt> <tt class="py-op">+=</tt> <tt class="py-string">"-I \"./%s\" "</tt> <tt class="py-op">%</tt> <tt class="py-name">bsfs</tt><tt class="py-op">[</tt><tt class="py-name">customisation</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="bsf.BSF.get_path" class="py-name" href="#" onclick="return doclink('link-42', 'get_path', 'link-34');">get_path</a></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-name">args</tt> <tt class="py-op">+=</tt> <tt class="py-string">"-I \"../include/%s\" "</tt> <tt class="py-op">%</tt> <tt class="py-name">bsfs</tt><tt class="py-op">[</tt><tt class="py-name">customisation</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="bsf.BSF.get_path" class="py-name" href="#" onclick="return doclink('link-43', 'get_path', 'link-34');">get_path</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-name">args</tt> <tt class="py-op">+=</tt> <tt class="py-string">"-I ..\\include\\oem"</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">flag</tt> <tt class="py-keyword">in</tt> <tt class="py-name">flags</tt><tt class="py-op">:</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> <tt class="py-op">+</tt> <tt class="py-string">" -D%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">flag</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-name">cdir</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">curdir</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chdir</tt> <tt class="py-op">(</tt><tt class="py-string">"/epoc32/rom"</tt><tt class="py-op">)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt id="link-44" class="py-name" targets="Method buildtools.Command.cmd()=buildtools.Command-class.html#cmd"><a title="buildtools.Command.cmd" class="py-name" href="#" onclick="return doclink('link-44', 'cmd', 'link-44');">cmd</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"cpp -nostdinc -u %s %s include\\locales_sc.iby -include .\\include\\header.iby %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt> <tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-name">suffix</tt><tt class="py-op">)</tt> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"Calling %s\n"</tt> <tt class="py-op">%</tt> <tt id="link-45" class="py-name"><a title="buildtools.Command.cmd" class="py-name" href="#" onclick="return doclink('link-45', 'cmd', 'link-44');">cmd</a></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">stdin</tt><tt class="py-op">,</tt> <tt class="py-name">stdout</tt><tt class="py-op">,</tt> <tt class="py-name">stderr</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">popen3</tt><tt class="py-op">(</tt><tt id="link-46" class="py-name"><a title="buildtools.Command.cmd" class="py-name" href="#" onclick="return doclink('link-46', 'cmd', 'link-44');">cmd</a></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">stdin</tt><tt class="py-op">.</tt><tt id="link-47" 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-47', 'close', 'link-47');">close</a></tt><tt class="py-op">(</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">result</tt> <tt class="py-op">=</tt> <tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt class="py-name">read</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">errors</tt> <tt class="py-op">=</tt> <tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</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">stderr</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><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-48', 'close', 'link-47');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><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-49', 'close', 'link-47');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-number">0</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-name">errors</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> </tt>
<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-comment"># parsing overrides first </tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">overrides</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</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">res</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="fileutils.AbstractScanner.match
pathaddition.match" class="py-name" href="#" onclick="return doclink('link-50', 'match', 'link-28');">match</a></tt><tt class="py-op">(</tt><tt class="py-string">r'^\s*(?:ROM_IMAGE\[\d+\]\s+)?data-override\s*=\s*(\S+)\s+(\S+)'</tt><tt class="py-op">,</tt> <tt class="py-name">line</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">res</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-keyword">print</tt> <tt class="py-string">"Found override directive %s -> %s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</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">overrides</tt><tt class="py-op">[</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<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-keyword">for</tt> <tt class="py-name">line</tt> <tt class="py-keyword">in</tt> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="fileutils.AbstractScanner.match
pathaddition.match" class="py-name" href="#" onclick="return doclink('link-51', 'match', 'link-28');">match</a></tt><tt class="py-op">(</tt><tt class="py-string">r'^\s*(ROM_IMAGE\[\d+\]\s+)?data-override\s*=\s*(\S+)\s+(\S+)'</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name" targets="Function localisation._apply_override()=localisation-module.html#_apply_override"><a title="localisation._apply_override" class="py-name" href="#" onclick="return doclink('link-52', '_apply_override', 'link-52');">_apply_override</a></tt><tt class="py-op">(</tt><tt class="py-name">overrides</tt><tt class="py-op">,</tt> <tt class="py-name">line</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">if</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="fileutils.AbstractScanner.match
pathaddition.match" class="py-name" href="#" onclick="return doclink('link-53', 'match', 'link-28');">match</a></tt><tt class="py-op">(</tt><tt class="py-string">"^\\s*data\\s*=\\s*MULTI_LINGUIFY"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</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">res</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"MULTI_LINGUIFY\s*\(\s*(\S+)\s+(\S+)\s+(\S+)\s*\)"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"rsc"</tt><tt class="py-op">:</tt> </tt>
<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">ext</tt> <tt class="py-op">=</tt> <tt class="py-string">"r%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt> </tt>
<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt id="link-54" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-54', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-55" 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-55', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">"data=%s.%s %s.%s\n"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">res</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">ext</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-string">"WARNING: Cannot extract '%s'"</tt> <tt class="py-op">%</tt> <tt class="py-name">line</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"\.rsc"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt id="link-56" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-56', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-57" 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-57', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"\.[rR][sS][cC]"</tt><tt class="py-op">,</tt> <tt class="py-string">r".r%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</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">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"\.dbz"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt id="link-58" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-58', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-59" 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-59', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"\.[dD][bB][zZ]"</tt><tt class="py-op">,</tt> <tt class="py-string">r".d%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"\.hlp"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt id="link-60" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-60', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-61" 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-61', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"\.[hH][lL][pP]"</tt><tt class="py-op">,</tt> <tt class="py-string">r".h%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"Content\\01"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> <tt class="py-comment">#rename Content\01 to Content\xx (where xx is language id). This is for handlng DTD files</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt id="link-62" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-62', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-63" 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-63', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"Content\\01"</tt><tt class="py-op">,</tt> <tt class="py-string">r"Content\\%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"\.o0001"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</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">lang</tt> <tt class="py-op">=</tt> <tt class="py-name">lid</tt> </tt>
<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">lang</tt><tt class="py-op">)</tt><tt class="py-op"><</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-name">lang</tt> <tt class="py-op">=</tt> <tt class="py-string">"0%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lang</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt id="link-64" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-64', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-65" 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-65', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"\.[oO]\d+"</tt><tt class="py-op">,</tt> <tt class="py-string">".o%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lang</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</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">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"elocl\.dll"</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt id="link-66" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-66', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-67" 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-67', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-string">r"\.[lL][oO][cC]|\.[dD][lL][lL]"</tt><tt class="py-op">,</tt> <tt class="py-string">".%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">lid</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-string">r"^\s*(data|file)="</tt><tt class="py-op">,</tt> <tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">I</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> <tt class="py-keyword">print</tt> <tt class="py-op">(</tt><tt class="py-string">"WARNING: This should not be included in resource.iby '%s'\nThis file should be included using an 'applicationnameVariant.iby' file.\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">line</tt><tt class="py-op">)</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt id="link-68" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-68', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-69" 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-69', 'write', 'link-37');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">"#endif\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> <tt id="link-70" class="py-name"><a title="ccm.Result.output
helium.output" class="py-name" href="#" onclick="return doclink('link-70', 'output', 'link-35');">output</a></tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><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-71', 'close', 'link-47');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">chdir</tt><tt class="py-op">(</tt><tt class="py-name">cdir</tt><tt class="py-op">)</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">status</tt> </tt>
</div><a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"><tt id="link-72" class="py-name" targets="Variable localisation.VARIANT_ID_KEY=localisation-module.html#VARIANT_ID_KEY"><a title="localisation.VARIANT_ID_KEY" class="py-name" href="#" onclick="return doclink('link-72', 'VARIANT_ID_KEY', 'link-72');">VARIANT_ID_KEY</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'variant.id'</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"><tt id="link-73" class="py-name" targets="Variable localisation.VARIATION_DIR_KEY=localisation-module.html#VARIATION_DIR_KEY"><a title="localisation.VARIATION_DIR_KEY" class="py-name" href="#" onclick="return doclink('link-73', 'VARIATION_DIR_KEY', 'link-73');">VARIATION_DIR_KEY</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'variation.dir'</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> </tt>
<a name="find_variant_path"></a><div id="find_variant_path-def"><a name="L213"></a><tt class="py-lineno">213</tt> <a class="py-toggle" href="#" id="find_variant_path-toggle" onclick="return toggle('find_variant_path');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="localisation-module.html#find_variant_path">find_variant_path</a><tt class="py-op">(</tt><tt class="py-param">config</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">=</tt><tt id="link-74" class="py-name"><a title="localisation.VARIANT_ID_KEY" class="py-name" href="#" onclick="return doclink('link-74', 'VARIANT_ID_KEY', 'link-72');">VARIANT_ID_KEY</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="find_variant_path-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="find_variant_path-expanded"><a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-docstring">""" This function helps to find the variant directory</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"><tt class="py-docstring"> using variant configuration</tt> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</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">has_key</tt><tt class="py-op">(</tt><tt id="link-75" class="py-name"><a title="localisation.VARIATION_DIR_KEY" class="py-name" href="#" onclick="return doclink('link-75', 'VARIATION_DIR_KEY', 'link-73');">VARIATION_DIR_KEY</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="buildtools.Command.path
sysdef.api.SpecialInstruction.path
sysdef.api.Unit.path" class="py-name" href="#" onclick="return doclink('link-76', 'path', 'link-1');">path</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="ccm.CCMObject.exists" class="py-name" href="#" onclick="return doclink('link-77', 'exists', 'link-10');">exists</a></tt><tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">[</tt><tt id="link-78" class="py-name"><a title="localisation.VARIATION_DIR_KEY" class="py-name" href="#" onclick="return doclink('link-78', 'VARIATION_DIR_KEY', 'link-73');">VARIATION_DIR_KEY</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">directory</tt> <tt class="py-keyword">in</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">listdir</tt><tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">[</tt><tt id="link-79" class="py-name"><a title="localisation.VARIATION_DIR_KEY" class="py-name" href="#" onclick="return doclink('link-79', 'VARIATION_DIR_KEY', 'link-73');">VARIATION_DIR_KEY</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="fileutils.AbstractScanner.match
pathaddition.match" class="py-name" href="#" onclick="return doclink('link-80', 'match', 'link-28');">match</a></tt><tt class="py-op">(</tt><tt class="py-string">r".*_%s$"</tt> <tt class="py-op">%</tt> <tt class="py-name">config</tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">directory</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="buildtools.Command.path
sysdef.api.SpecialInstruction.path
sysdef.api.Unit.path" class="py-name" href="#" onclick="return doclink('link-81', 'path', 'link-1');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">config</tt><tt class="py-op">[</tt><tt id="link-82" class="py-name"><a title="localisation.VARIATION_DIR_KEY" class="py-name" href="#" onclick="return doclink('link-82', 'VARIATION_DIR_KEY', 'link-73');">VARIATION_DIR_KEY</a></tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">directory</tt><tt class="py-op">)</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L222"></a><tt class="py-lineno">222</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:23 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>