1 <?xml version="1.0" encoding="ascii"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
18 <th bgcolor="#70b0f0" class="navbar-select"
19 > Home </th>
22 <th> <a
23 href="module-tree.html">Trees</a> </th>
26 <th> <a
27 href="identifier-index.html">Indices</a> </th>
30 <th> <a
31 href="help.html">Help</a> </th>
33 <!-- Project homepage -->
34 <th class="navbar" align="right" width="100%">
35 <table border="0" cellpadding="0" cellspacing="0">
36 <tr><th class="navbar" align="center"
37 ><a class="navbar" target="_top" href="/">lxml API</a></th>
41 <table width="100%" cellpadding="0" cellspacing="0">
44 <span class="breadcrumbs">
49 <table cellpadding="0" cellspacing="0">
50 <!-- hide/show private -->
51 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
52 onclick="toggle_private();">hide private</a>]</span></td></tr>
53 <tr><td align="right"><span class="options"
54 >[<a href="frames.html" target="_top">frames</a
55 >] | <a href="lxml-pysrc.html"
56 target="_top">no frames</a>]</span></td></tr>
61 <h1 class="epydoc">Source Code for <a href="lxml-module.html">Package lxml</a></h1>
63 <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment"># this is a package</tt> </tt>
64 <a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
65 <a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
66 <a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> </tt>
67 <a name="get_include"></a><div id="get_include-def"><a name="L5"></a><tt class="py-lineno"> 5</tt> <a class="py-toggle" href="#" id="get_include-toggle" onclick="return toggle('get_include');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="lxml-module.html#get_include">get_include</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
68 </div><div id="get_include-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="get_include-expanded"><a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
69 <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> Returns a list of header include paths (for lxml itself, libxml2</tt> </tt>
70 <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> and libxslt) needed to compile C code against lxml if it was built</tt> </tt>
71 <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> with statically linked libraries.</tt> </tt>
72 <a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
73 <a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> <tt class="py-name">lxml_path</tt> <tt class="py-op">=</tt> <tt class="py-name">__path__</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
74 <a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-name">include_path</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Variable lxml.etree.XPath.path=lxml.etree.XPath-class.html#path"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-0', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Method lxml.cssselect.XPathExpr.join()=lxml.cssselect.XPathExpr-class.html#join"><a title="lxml.cssselect.XPathExpr.join" class="py-name" href="#" onclick="return doclink('link-1', 'join', 'link-1');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">lxml_path</tt><tt class="py-op">,</tt> <tt class="py-string">'include'</tt><tt class="py-op">)</tt> </tt>
75 <a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-name">includes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">lxml_path</tt><tt class="py-op">]</tt> </tt>
76 <a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"> </tt>
77 <a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt id="link-2" class="py-name" targets="Variable lxml.etree._Entity.name=lxml.etree._Entity-class.html#name,Variable lxml.etree._ModifyContentOnlyEntityProxy.name=lxml.etree._ModifyContentOnlyEntityProxy-class.html#name,Variable lxml.etree._ReadOnlyEntityProxy.name=lxml.etree._ReadOnlyEntityProxy-class.html#name,Variable lxml.html.InputMixin.name=lxml.html.InputMixin-class.html#name,Variable lxml.objectify.PyType.name=lxml.objectify.PyType-class.html#name"><a title="lxml.etree._Entity.name
78 lxml.etree._ModifyContentOnlyEntityProxy.name
79 lxml.etree._ReadOnlyEntityProxy.name
80 lxml.html.InputMixin.name
81 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-2', 'name', 'link-2');">name</a></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">include_path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
82 <a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-name">includes</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method lxml.etree._AppendOnlyElementProxy.append()=lxml.etree._AppendOnlyElementProxy-class.html#append,Method lxml.etree._Element.append()=lxml.etree._Element-class.html#append,Method lxml.etree._OpaqueDocumentWrapper.append()=lxml.etree._OpaqueDocumentWrapper-class.html#append,Method lxml.etree.__ContentOnlyElement.append()=lxml.etree.__ContentOnlyElement-class.html#append"><a title="lxml.etree._AppendOnlyElementProxy.append
83 lxml.etree._Element.append
84 lxml.etree._OpaqueDocumentWrapper.append
85 lxml.etree.__ContentOnlyElement.append" class="py-name" href="#" onclick="return doclink('link-3', 'append', 'link-3');">append</a></tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="lxml.etree.XPath.path" class="py-name" href="#" onclick="return doclink('link-4', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="lxml.cssselect.XPathExpr.join" class="py-name" href="#" onclick="return doclink('link-5', 'join', 'link-1');">join</a></tt><tt class="py-op">(</tt><tt class="py-name">include_path</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name"><a title="lxml.etree._Entity.name
86 lxml.etree._ModifyContentOnlyEntityProxy.name
87 lxml.etree._ReadOnlyEntityProxy.name
88 lxml.html.InputMixin.name
89 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-6', 'name', 'link-2');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
90 <a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
91 <a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">includes</tt> </tt>
92 </div><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> </tt><script type="text/javascript">
94 expandto(location.href);
99 <!-- ==================== NAVIGATION BAR ==================== -->
100 <table class="navbar" border="0" width="100%" cellpadding="0"
101 bgcolor="#a0c0ff" cellspacing="0">
104 <th bgcolor="#70b0f0" class="navbar-select"
105 > Home </th>
108 <th> <a
109 href="module-tree.html">Trees</a> </th>
112 <th> <a
113 href="identifier-index.html">Indices</a> </th>
116 <th> <a
117 href="help.html">Help</a> </th>
119 <!-- Project homepage -->
120 <th class="navbar" align="right" width="100%">
121 <table border="0" cellpadding="0" cellspacing="0">
122 <tr><th class="navbar" align="center"
123 ><a class="navbar" target="_top" href="/">lxml API</a></th>
127 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
129 <td align="left" class="footer">
130 Generated by Epydoc 3.0.1 on Fri Sep 28 21:20:59 2012
132 <td align="right" class="footer">
133 <a target="mainFrame" href="http://epydoc.sourceforge.net"
134 >http://epydoc.sourceforge.net</a>
139 <script type="text/javascript">
141 // Private objects are initially displayed (because if
142 // javascript is turned off then we want them to be
143 // visible); but by default, we want to hide them. So hide
144 // them unless we have a cookie that says to show them.