lxml - The Python XML Toolkit
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
March 2008
- 15 participants
- 33 discussions
Hi,
the current trunk now has support for Python implemented XSLT extension
elements. It's sort of a sandbox environment with read-only Elements, where
you can do basically anything based on the stylesheet and the input document,
and then append some result subtree to the XSLT output tree.
Here's a short XSLT snippet that uses an extension, and a Python class that
provides such an extension:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:myns="testns"
extension-element-prefixes="myns">
<xsl:template match="a">
<A>
<myns:myext><x>X</x><y>Y</y><z/></myns:myext>
</A>
</xsl:template>
</xsl:stylesheet>
class MyExt(etree.XSLTExtension):
def execute(self, context, self_node, input_node, output_parent):
# apply templates to my own children and process the result
for child in self_node:
for result in self.apply_templates(context, child):
if isinstance(result, basestring):
el = etree.Element("T")
el.text = result
else:
el = result
output_parent.append(el)
I don't remember when I first started thinking about this, but it was actually
pretty hard to get right until now. I uploaded some docs to the dev site:
http://codespeak.net/lxml/dev/xpathxslt.html#extension-elements
Note that this is currently an experimental feature that will go into lxml
2.1. Any comments and bug reports will be very much appreciated.
Have fun,
Stefan
1
0
[lxml-dev] Segfault and bus error when importing lxml.html.clean after importing webbrowser
by Jon Rosebaugh 01 Mar '08
by Jon Rosebaugh 01 Mar '08
01 Mar '08
I was trying to use lxml.html.clean to sanitize comments in my blog.
Unfortunately, although I can import and use it in a standalone
console session, it fails within the webapp. Sometimes it segfaults,
and sometimes it's a bus error instead.
After going through all the imports to see what _they_ imported, I
finally tracked down a minimal example that can cause the problem:
import webbrowser
import lxml.html.clean
If I reverse the order of imports, everything works fine, so for the
moment I've worked around it by making sure that lxml.html.clean is
imported the very first thing.
I have lxml compiled from the 2.0 tgz from the site, libxml2 2.6.31
and libxslt 1.1.22 installed via macports (both the latest versions
macports has), Cython 0.9.6.11 installed, and I'm using Python 2.5.1
as downloaded from python.org for OS X.
Here's the crash log Mac OS X provides:
Process: Python [82702]
Path:
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: bash [188]
Date/Time: 2008-02-02 00:05:49.472 -0600
OS Version: Mac OS X 10.5.1 (9B18)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000005
Crashed Thread: 0
Thread 0 Crashed:
0 libxml2.2.dylib 0x91cda419 xmlDictLookup + 360
1 libxml2.2.dylib 0x00d78728 xmlXPathCompExprAdd + 280
2 libxml2.2.dylib 0x00d84e0c xmlXPathCompStep + 1004
3 libxml2.2.dylib 0x00d85812
xmlXPathCompRelativeLocationPath + 98
4 libxml2.2.dylib 0x00d86235 xmlXPathCompPathExpr + 1973
5 libxml2.2.dylib 0x00d86c35 xmlXPathCompUnaryExpr + 213
6 libxml2.2.dylib 0x00d86e3f
xmlXPathCompMultiplicativeExpr + 15
7 libxml2.2.dylib 0x00d8702f xmlXPathCompAdditiveExpr + 15
8 libxml2.2.dylib 0x00d8717f xmlXPathCompRelationalExpr + 15
9 libxml2.2.dylib 0x00d8732f xmlXPathCompEqualityExpr + 15
10 libxml2.2.dylib 0x00d8748f xmlXPathCompAndExpr + 15
11 libxml2.2.dylib 0x00d87602 xmlXPathCompileExpr + 18
12 libxml2.2.dylib 0x00d868ec xmlXPathCompPathExpr + 3692
13 libxml2.2.dylib 0x00d86c35 xmlXPathCompUnaryExpr + 213
14 libxml2.2.dylib 0x00d86e3f
xmlXPathCompMultiplicativeExpr + 15
15 libxml2.2.dylib 0x00d8702f xmlXPathCompAdditiveExpr + 15
16 libxml2.2.dylib 0x00d8717f xmlXPathCompRelationalExpr + 15
17 libxml2.2.dylib 0x00d8732f xmlXPathCompEqualityExpr + 15
18 libxml2.2.dylib 0x00d8748f xmlXPathCompAndExpr + 15
19 libxml2.2.dylib 0x00d87602 xmlXPathCompileExpr + 18
20 libxml2.2.dylib 0x00d87872 xmlXPathCompPredicate + 194
21 libxml2.2.dylib 0x00d84d4e xmlXPathCompStep + 814
22 libxml2.2.dylib 0x00d85812
xmlXPathCompRelativeLocationPath + 98
23 libxml2.2.dylib 0x00d86235 xmlXPathCompPathExpr + 1973
24 libxml2.2.dylib 0x00d86c35 xmlXPathCompUnaryExpr + 213
25 libxml2.2.dylib 0x00d86e3f
xmlXPathCompMultiplicativeExpr + 15
26 libxml2.2.dylib 0x00d8702f xmlXPathCompAdditiveExpr + 15
27 libxml2.2.dylib 0x00d8717f xmlXPathCompRelationalExpr + 15
28 libxml2.2.dylib 0x00d8732f xmlXPathCompEqualityExpr + 15
29 libxml2.2.dylib 0x00d8748f xmlXPathCompAndExpr + 15
30 libxml2.2.dylib 0x00d87602 xmlXPathCompileExpr + 18
31 libxml2.2.dylib 0x00d8c6ca xmlXPathCtxtCompile + 90
32 etree.so 0x00bdc1d7
__pyx_pf_4lxml_5etree_5XPath___init__ + 551 (lxml.etree.c:79217)
33 org.python.python 0x00448981 type_call + 166 (typeobject.c:436)
34 org.python.python 0x003f9278 PyObject_Call + 45
(abstract.c:1860)
35 org.python.python 0x00480851 PyEval_EvalFrameEx +
9242 (ceval.c:3775)
36 org.python.python 0x00484cdc PyEval_EvalCodeEx + 1819
(ceval.c:2831)
37 org.python.python 0x00484e90 PyEval_EvalCode + 87 (ceval.c:500)
38 org.python.python 0x0049bcbe
PyImport_ExecCodeModuleEx + 193 (import.c:669)
39 org.python.python 0x0049c114 load_source_module + 726
(import.c:953)
40 org.python.python 0x0049cd9b import_submodule + 293
(import.c:2394)
41 org.python.python 0x0049cfe9 load_next + 195 (import.c:2214)
42 org.python.python 0x0049d4dd import_module_level +
213 (import.c:2002)
43 org.python.python 0x0049d98d
PyImport_ImportModuleLevel + 45 (import.c:2066)
44 org.python.python 0x00478917 builtin___import__ + 156
(bltinmodule.c:49)
45 org.python.python 0x003f9278 PyObject_Call + 45
(abstract.c:1860)
46 org.python.python 0x0047d5b2
PyEval_CallObjectWithKeywords + 112 (ceval.c:3433)
47 org.python.python 0x00481464 PyEval_EvalFrameEx +
12333 (ceval.c:2063)
48 org.python.python 0x00484cdc PyEval_EvalCodeEx + 1819
(ceval.c:2831)
49 org.python.python 0x00484e90 PyEval_EvalCode + 87 (ceval.c:500)
50 org.python.python 0x004a7cf2
PyRun_InteractiveOneFlags + 460 (pythonrun.c:1271)
51 org.python.python 0x004a7f2e
PyRun_InteractiveLoopFlags + 85 (pythonrun.c:723)
52 org.python.python 0x004a86da PyRun_AnyFileExFlags +
155 (pythonrun.c:690)
53 org.python.python 0x004b5bb6 Py_Main + 3077 (main.c:523)
54 org.python.python 0x00001f8e 0x1000 + 3982
55 org.python.python 0x00001eb5 0x1000 + 3765
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x009d0bd4 ebx: 0x91cda2c2 ecx: 0x00000004 edx: 0x0000e3d0
edi: 0x00000005 esi: 0x00000005 ebp: 0xbfffd428 esp: 0xbfffd3f0
ss: 0x0000001f efl: 0x00010202 eip: 0x91cda419 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0x00000005
Binary Images:
0x1000 - 0x1fff +org.python.python 2.5a0 (2.5alpha0)
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
0xea000 - 0xebfff +cStringIO.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/cStringIO.so
0x3f0000 - 0x4e4fc3 +org.python.python 2.5a0 (2.5)
/Library/Frameworks/Python.framework/Versions/2.5/Python
0x7f4000 - 0x7f5ffb +select.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/select.so
0x900000 - 0x926fdf +readline.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/readline.so
0x93e000 - 0x96ffe7 +libncurses.5.dylib ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/libncurses.5.dylib
0x98b000 - 0x98dfff +collections.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/collections.so
0x99a000 - 0x99bfff +fcntl.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/fcntl.so
0x9e3000 - 0x9e6ffb +_struct.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_struct.so
0x9f4000 - 0x9f5ff3 +time.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/time.so
0xb00000 - 0xb02fff +binascii.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/binascii.so
0xb0d000 - 0xb0e073 +icglue.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/icglue.so
0xb1c000 - 0xb1ffff +strop.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/strop.so
0xb2c000 - 0xb2ffff +_Res.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_Res.so
0xb3e000 - 0xb44fff +_File.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_File.so
0xb63000 - 0xb64ffd +MacOS.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/MacOS.so
0xbb5000 - 0xc67ff9 +etree.so ??? (???)
<9f2b581810d292f482356b73a83969f9>
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/lxml-2.0-py2.5-macosx-10.3-fat.egg/lxml/etree.so
0xcdd000 - 0xd09fff +libxslt.1.dylib ??? (???)
/opt/local/lib/libxslt.1.dylib
0xd13000 - 0xd1ffff +libexslt.0.dylib ??? (???)
/opt/local/lib/libexslt.0.dylib
0xd25000 - 0xe27fef +libxml2.2.dylib ??? (???)
/opt/local/lib/libxml2.2.dylib
0xe59000 - 0xe69ffd +libz.1.dylib ??? (???) /opt/local/lib/libz.1.dylib
0xe6e000 - 0xf65ff0 +libiconv.2.dylib ??? (???)
/opt/local/lib/libiconv.2.dylib
0xfd2000 - 0xfd4fff +operator.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/operator.so
0xfdf000 - 0xfe2fff +itertools.so ??? (???)
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/itertools.so
0x8fe00000 - 0x8fe2d883 dyld 95.3 (???)
<81592e798780564b5d46b988f7ee1a6a> /usr/lib/dyld
0x9029d000 - 0x902f6fff libGLU.dylib ??? (???)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x902f7000 - 0x906b5fea libLAPACK.dylib ??? (???)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x906b6000 - 0x907fbff7 com.apple.ImageIO.framework 2.0.0 (2.0.0)
<154d4d8cda2bd99518cbabc9f2d69833>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x907fc000 - 0x9080affd libz.1.dylib ??? (???)
<5ddd8539ae2ebfd8e7cc1c57525385c7> /usr/lib/libz.1.dylib
0x908b7000 - 0x908b7fff com.apple.Carbon 136 (136)
<98a5e3bc0c4fa44bbb09713bb88707fe>
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x908c8000 - 0x908ccfff libGIF.dylib ??? (???)
<d4234e6f5e5f530bdafb969157f1f17b>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x908cd000 - 0x90b46fe7 com.apple.Foundation 6.5.1 (677.1)
<85ac18c7cd454378db6122bea0c00965>
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x90b47000 - 0x90e20fe7 com.apple.CoreServices.CarbonCore 783 (783)
<8370e664eeb25edc98d5c1f5405b06ae>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90e21000 - 0x90e21ffd com.apple.Accelerate.vecLib 3.4 (vecLib 3.4)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x90fde000 - 0x9101dfef libTIFF.dylib ??? (???)
<6d0f80e9d4d81f3f64c876aca005bd53>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x9101e000 - 0x910aaff7 com.apple.LaunchServices 286 (286)
<72b15e7a01e42d510f0339e90113d5d6>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x910ab000 - 0x910caffa libJPEG.dylib ??? (???)
<0cfb80109d624beb9ceb3c43b6c5ec10>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x910cb000 - 0x910e1fe7 com.apple.CoreVideo 1.5.0 (1.5.0)
<7e010557527a0e6d49147c297d16850a>
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x910e2000 - 0x911c1fff libobjc.A.dylib ??? (???)
<5eda47fec2d0e7853b3506aa1fd2dafa> /usr/lib/libobjc.A.dylib
0x911eb000 - 0x91345fe3 libSystem.B.dylib ??? (???)
<8ecc83dc0399be3946f7a46e88cf4bbb> /usr/lib/libSystem.B.dylib
0x91346000 - 0x91350feb com.apple.audio.SoundManager 3.9.2 (3.9.2)
<0f2ba6e891d3761212cf5a5e6134d683>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x91c34000 - 0x91c3afff com.apple.print.framework.Print 218 (220)
<c35172175abbe554ddadd9b6401351fa>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x91c3b000 - 0x91c51fff com.apple.DictionaryServices 1.0.0 (1.0.0)
<ad0aa0252e3323d182e17f50defe56fc>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x91c52000 - 0x91c6dffb libPng.dylib ??? (???)
<b6abcac36ec7654ff3e1cfa786b0117b>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x91c78000 - 0x91c78ffb com.apple.installserver.framework 1.0 (8)
/System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/InstallServer
0x91cd8000 - 0x91db9ff7 libxml2.2.dylib ??? (???)
<450ec38b57fb46013847cce851001a2f> /usr/lib/libxml2.2.dylib
0x91e5c000 - 0x91f0cfff edu.mit.Kerberos 6.0.11 (6.0.11)
<33c25789baedcd70a7e24881775dd9ad>
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x92527000 - 0x92533ff5 libGL.dylib ??? (???)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x9253c000 - 0x925c6fff com.apple.framework.IOKit 1.5.1 (???)
<5176a7383151a19c962334009fef2c6d>
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x9260a000 - 0x926b1fff com.apple.QD 3.11.50 (???)
<e2f71720ae1dad06a8883ac80775b21a>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x926b2000 - 0x92768fe3 com.apple.CoreServices.OSServices 210.2
(210.2) <4ed69f07fc0f211ab32d1ee96e281fc2>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x92a21000 - 0x92a21ff8 com.apple.ApplicationServices 34 (34)
<8f910fa65f01d401ad8d04cc933cf887>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x939aa000 - 0x93a75fff com.apple.ColorSync 4.5.0 (4.5.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x93a7c000 - 0x93abefef com.apple.NavigationServices 3.5.1 (161)
<cc6bd78eabf1e2e7166914e9f12f5850>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x93c16000 - 0x93cc5fff com.apple.DesktopServices 1.4.3 (1.4.3)
<66d5ed56111c43d234e235d365d02469>
/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x93cc6000 - 0x93cf0fef libauto.dylib ??? (???)
<d468bc4a8a69343f1748c293db1b57fb> /usr/lib/libauto.dylib
0x93d61000 - 0x94067fff com.apple.HIToolbox 1.5.0 (???)
<1b872a7151ee3f80c9c736a3e46d00d9>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x94080000 - 0x94147ff2 com.apple.vImage 3.0 (3.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x94196000 - 0x941a6ffc com.apple.LangAnalysis 1.6.4 (1.6.4)
<cbeb17ab39f28351fe2ab5b82bf465bc>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x941a7000 - 0x94226ff5 com.apple.SearchKit 1.2.0 (1.2.0)
<277b460da86bc222785159fe77e2e2ed>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x94227000 - 0x942d9ffb libcrypto.0.9.7.dylib ??? (???)
<330b0e48e67faffc8c22dfc069ca7a47> /usr/lib/libcrypto.0.9.7.dylib
0x942da000 - 0x942daffa com.apple.CoreServices 32 (32)
<2fcc8f3bd5bbfc000b476cad8e6a3dd2>
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x942db000 - 0x94352fe3 com.apple.CFNetwork 220 (221)
<972a41911805859205b057a6f5b91e8d>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x943f2000 - 0x943f7fff com.apple.CommonPanels 1.2.4 (85)
<ea0665f57cd267609466ed8b2b20e893>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x943f8000 - 0x94427fe3 com.apple.AE 402 (402)
<994ba8e884aefe7bf1fc5987df099e7b>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x94428000 - 0x944afff7 libsqlite3.0.dylib ??? (???)
<273efcb717e89c21207c851d7d33fda4> /usr/lib/libsqlite3.0.dylib
0x944b0000 - 0x944ddfeb libvDSP.dylib ??? (???)
<a26683d121ee0f96df9a9d0bfca36049>
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x944de000 - 0x944dfffc libffi.dylib ??? (???)
<a3b573eb950ca583290f7b2b4c486d09> /usr/lib/libffi.dylib
0x9455e000 - 0x9456efff com.apple.speech.synthesis.framework 3.6.59
(3.6.59) <4ffef145fad3d4d787e0c33eab26b336>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x9456f000 - 0x9458dfff libresolv.9.dylib ??? (???)
<54e6a08c2f108bdf5916fb483d51961b> /usr/lib/libresolv.9.dylib
0x945c8000 - 0x945dcff3 com.apple.ImageCapture 4.0 (5.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x945dd000 - 0x949edfef libBLAS.dylib ??? (???)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x949ee000 - 0x94a4aff7 com.apple.htmlrendering 68 (1.1.3)
<fe87a9dede38db00e6c8949942c6bd4f>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0x94a51000 - 0x94f1dffe libGLProgrammability.dylib ??? (???)
<e8bc0af671427cf2b6279a035805a086>
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x94f1f000 - 0x94f79ff7 com.apple.CoreText 2.0.0 (???)
<7fa39cd5bc847615ec02e7c7a37c0508>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x94f7a000 - 0x95143fef com.apple.security 5.0.1 (32736)
<8c9eda0fcc1d8a571543025ac900715f>
/System/Library/Frameworks/Security.framework/Versions/A/Security
0x95156000 - 0x957edfef com.apple.CoreGraphics 1.351.0 (???)
<7a6f399039eed6dbe845c169f7d21a70>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x957ee000 - 0x957fbfe7 com.apple.opengl 1.5.5 (1.5.5)
<aa08b52d2a84b44dc6ee5d544a53fe8a>
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x95808000 - 0x95820fff com.apple.openscripting 1.2.6 (???)
<b8e553df643f2aec68fa968b3b459b2b>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x95835000 - 0x958b1feb com.apple.audio.CoreAudio 3.1.0 (3.1)
<70bb7c657061631491029a61babe0b26>
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x958b2000 - 0x958b5fff com.apple.help 1.1 (36)
<b507b08e484cb89033e9cf23062d77de>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x95ab6000 - 0x95ab8ff5 libRadiance.dylib ??? (???)
<20eadb285da83df96c795c2c5fa20590>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x95ab9000 - 0x95abbfff com.apple.securityhi 3.0 (30817)
<2b2854123fed609d1820d2779e2e0963>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x95b66000 - 0x95babfef com.apple.Metadata 10.5.0 (398)
<4fd74fba0062c2e08ec4b1c10b40ff63>
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x95bac000 - 0x95c3eff3 com.apple.ApplicationServices.ATS 3.0 (???)
<fb5f572243dbc370a0ea5efc8e81ae11>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x95c3f000 - 0x95c9cffb libstdc++.6.dylib ??? (???)
<04b812dcec670daa8b7d2852ab14be60> /usr/lib/libstdc++.6.dylib
0x95f3d000 - 0x95f8dff7 com.apple.HIServices 1.6.0 (???)
<d74aa73e4cfd30a08fb169198a8d2539>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x96083000 - 0x96116fff com.apple.ink.framework 101.3 (86)
<bf3fa8927b4b8baae92381a976fd2079>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x9642d000 - 0x96463fff com.apple.SystemConfiguration 1.9.0 (1.9.0)
<7919d9588c3b0d556646e555b7193f1f>
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x96483000 - 0x965bbff7 libicucore.A.dylib ??? (???)
<afcea652ff2ec36885b2c81c57d06d4c> /usr/lib/libicucore.A.dylib
0x96782000 - 0x967fcff8 com.apple.print.framework.PrintCore 5.5 (245)
<9441d178f4b430cf92b67bf346646693>
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x96835000 - 0x9685cfff libcups.2.dylib ??? (???)
<5521498e8902ddd0b15cfaa7db384e29> /usr/lib/libcups.2.dylib
0x9685d000 - 0x96897ff7 com.apple.coreui 0.1 (60)
/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x96898000 - 0x9689ffe9 libgcc_s.1.dylib ??? (???)
<f53c808e87d1184c0f9df63aef53ce0b> /usr/lib/libgcc_s.1.dylib
0x968a4000 - 0x968abffe libbsm.dylib ??? (???)
<d25c63378a5029648ffd4b4669be31bf> /usr/lib/libbsm.dylib
0x968ea000 - 0x96c80ff7 com.apple.QuartzCore 1.5.1 (1.5.1)
<deb61cbeb3f734a1b2f4669f6268b9de>
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x96c81000 - 0x96ca5fff libxslt.1.dylib ??? (???)
<4933ddc7f6618743197aadc85b33b5ab> /usr/lib/libxslt.1.dylib
0x96ca6000 - 0x96caefff com.apple.DiskArbitration 2.2 (2.2)
<1551b2af557fdf6f368f93e093933852>
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x96caf000 - 0x96cafffd com.apple.Accelerate 1.4 (Accelerate 1.4)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x96cb0000 - 0x96d24fef libvMisc.dylib ??? (???)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x96d68000 - 0x96da5ff7 libGLImage.dylib ??? (???)
<202d73e6a4688fc06ff11b71910c2ce7>
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x96dd6000 - 0x96dd7fef libmathCommon.A.dylib ??? (???)
/usr/lib/system/libmathCommon.A.dylib
0x96dd8000 - 0x96f0afe7 com.apple.CoreFoundation 6.5 (476)
<8bfebc0dbad6fc33bea0fa00a1b9ec37>
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x96f0b000 - 0x96f14fff com.apple.speech.recognition.framework 3.7.24
(3.7.24) <d3180f9edbd9a5e6f283d6156aa3c602>
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0xfffe8000 - 0xfffebfff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib
0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
6
17
There doesn't seem to be any way to set a document's URL when parsing
the document. E.g.:
>>> from lxml import html
>>> tree = html.parse('http://www.python.org')
>>> tree.docinfo.URL
'http://www.python.org'
But the parse function doesn't really take any arguments, and the URL
attribute is write-only. Ideally you could do fromstring('...doc...',
URL='location'). (Also I'm not sure why the URL shouldn't be writable.)
Ian
2
11