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="get_include"></a><div id="get_include-def"><a name="L3"></a><tt class="py-lineno"> 3</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>
66 </div><div id="get_include-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="get_include-expanded"><a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
67 <a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> Returns a list of header include paths (for lxml itself, libxml2</tt> </tt>
68 <a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> and libxslt) needed to compile C code against lxml if it was built</tt> </tt>
69 <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> with statically linked libraries.</tt> </tt>
70 <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
71 <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
72 <a name="L10"></a><tt class="py-lineno">10</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>
73 <a name="L11"></a><tt class="py-lineno">11</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,Variable lxml.etree._LogEntry.path=lxml.etree._LogEntry-class.html#path"><a title="lxml.etree.XPath.path
74 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-0', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">lxml_path</tt><tt class="py-op">,</tt> <tt class="py-string">'includes'</tt><tt class="py-op">)</tt> </tt>
75 <a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt id="link-1" class="py-name" targets="Package lxml.includes=lxml.includes-module.html"><a title="lxml.includes" class="py-name" href="#" onclick="return doclink('link-1', 'includes', 'link-1');">includes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">include_path</tt><tt class="py-op">,</tt> <tt class="py-name">lxml_path</tt><tt class="py-op">]</tt> </tt>
76 <a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> </tt>
77 <a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt id="link-2" class="py-name" targets="Variable lxml.etree.DTD.name=lxml.etree.DTD-class.html#name,Variable lxml.etree._Entity.name=lxml.etree._Entity-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.DTD.name
78 lxml.etree._Entity.name
79 lxml.html.InputMixin.name
80 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>
81 <a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt id="link-3" class="py-name"><a title="lxml.etree.XPath.path
82 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-3', 'path', 'link-0');">path</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
83 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-4', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">include_path</tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name"><a title="lxml.etree.DTD.name
84 lxml.etree._Entity.name
85 lxml.html.InputMixin.name
86 lxml.objectify.PyType.name" class="py-name" href="#" onclick="return doclink('link-5', 'name', 'link-2');">name</a></tt><tt class="py-op">)</tt> </tt>
87 <a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="lxml.etree.XPath.path
88 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-6', 'path', 'link-0');">path</a></tt><tt class="py-op">.</tt><tt class="py-name">isdir</tt><tt class="py-op">(</tt><tt id="link-7" class="py-name"><a title="lxml.etree.XPath.path
89 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-7', 'path', 'link-0');">path</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 id="link-8" class="py-name"><a title="lxml.includes" class="py-name" href="#" onclick="return doclink('link-8', 'includes', 'link-1');">includes</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method lxml.etree._Element.append()=lxml.etree._Element-class.html#append"><a title="lxml.etree._Element.append" class="py-name" href="#" onclick="return doclink('link-9', 'append', 'link-9');">append</a></tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="lxml.etree.XPath.path
91 lxml.etree._LogEntry.path" class="py-name" href="#" onclick="return doclink('link-10', 'path', 'link-0');">path</a></tt><tt class="py-op">)</tt> </tt>
92 <a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> </tt>
93 <a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-11" class="py-name"><a title="lxml.includes" class="py-name" href="#" onclick="return doclink('link-11', 'includes', 'link-1');">includes</a></tt> </tt>
94 </div><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> </tt><script type="text/javascript">
96 expandto(location.href);
101 <!-- ==================== NAVIGATION BAR ==================== -->
102 <table class="navbar" border="0" width="100%" cellpadding="0"
103 bgcolor="#a0c0ff" cellspacing="0">
106 <th bgcolor="#70b0f0" class="navbar-select"
107 > Home </th>
110 <th> <a
111 href="module-tree.html">Trees</a> </th>
114 <th> <a
115 href="identifier-index.html">Indices</a> </th>
118 <th> <a
119 href="help.html">Help</a> </th>
121 <!-- Project homepage -->
122 <th class="navbar" align="right" width="100%">
123 <table border="0" cellpadding="0" cellspacing="0">
124 <tr><th class="navbar" align="center"
125 ><a class="navbar" target="_top" href="/">lxml API</a></th>
129 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
131 <td align="left" class="footer">
132 Generated by Epydoc 3.0.1
133 on Wed Jan 29 12:26:21 2020
135 <td align="right" class="footer">
136 <a target="mainFrame" href="http://epydoc.sourceforge.net"
137 >http://epydoc.sourceforge.net</a>
142 <script type="text/javascript">
144 // Private objects are initially displayed (because if
145 // javascript is turned off then we want them to be
146 // visible); but by default, we want to hide them. So hide
147 // them unless we have a cookie that says to show them.