lxml.mgp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %deffont "standard" xfont "helvetica-medium-r"
  3. %deffont "thick" xfont "helvetica-bold-r"
  4. %deffont "typewriter" xfont "courier-medium-r"
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %%
  7. %% Default settings per each line numbers.
  8. %%
  9. %default 1 area 90 90, leftfill, size 2, fore "gray20", back "white", font "standard", hgap 0
  10. %default 2 size 7, vgap 10, prefix " ", ccolor "blue"
  11. %default 3 size 2, bar "gray70", vgap 10
  12. %default 4 size 5, fore "gray20", vgap 30, prefix " ", font "standard"
  13. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  14. %%
  15. %% Default settings that are applied to TAB-indented lines.
  16. %%
  17. %tab 1 size 5, vgap 40, prefix " ", icon box "red" 50
  18. %tab 2 size 4, vgap 40, prefix " ", icon arc "yellow" 50
  19. %tab 3 size 3, vgap 40, prefix " ", icon delta3 "white" 40
  20. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  21. %page
  22. lxml - a sane Python wrapper for libxml
  23. %center
  24. Martijn Faassen, Infrae
  25. faassen@infrae.com
  26. %page
  27. The C library libxml has huge benefits
  28. Standards-compliant XML support
  29. full-featured
  30. actively maintained by XML exports
  31. fast. fast! FAST!
  32. %page
  33. Features of libxml
  34. Parsing
  35. Tree based (DOM-ish) XML structure
  36. XPath support
  37. XSLT support (libxslt)
  38. Relax NG (schema) support
  39. And more
  40. %page
  41. But libxml already has Python bindings!
  42. very low level and C-ish (not Pythonic)
  43. underdocumented. huge, you get lost in them
  44. works with UTF-8, not native Python unicode
  45. can cause segfaults from Python
  46. have to do manual memory management!
  47. %page
  48. lxml is a new Python binding for libxml
  49. Aims (read: TODOS)
  50. Pythonic API
  51. Documented
  52. Use Python unicode strings in API
  53. Safe (no segfaults)
  54. No manual memory management!
  55. %page
  56. Tradeoffs
  57. Slower because of better wrapping.
  58. But libxml is so fast this likely doesn't matter much.
  59. Not all features of libxml exposed (unless you help)
  60. %page
  61. What is there now - Proof of concept
  62. Automatic destruction of documents (refcounted)
  63. Start of ElementTree style API for tree
  64. %page
  65. Future
  66. Fix bugs, add features
  67. Moving into svn repository on codespeak.net
  68. Help!